public void SomeMethod() { using (var detailForm = new DetailForm(this)) { detailForm.ShowDialog(); } }
public void SomeMethod() { using (var detailForm = new DetailForm()) { detailForm.ShowDialog(); Name = detailForm.Name; Age = detailForm.Age; } }
private void dgvAnimeList_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { var i = e.RowIndex; if (dgvAnimeList.Rows.Count != 0) { var detail = new DetailForm(); detail.pkgID = allList[i].package_anim; detail.ShowDialog(); } }