What type of method is String dgvValue(int cell)
in the below code?
private void btnEdit_Click(object sender, EventArgs e)
{
if (dgvGuestList.SelectedRows.Count > 0)
{
String dgvValue(int cell)
{
return dgvGuestList.SelectedRows[0].Cells[cell].Value.ToString();
}
editGuest editGuest = new editGuest(int.Parse(dgvValue(0)), dgvValue(1),
int.Parse(dgvValue(2)), dgvValue(0), dgvValue(0), dgvValue(0), dgvValue(0));
editGuest.ShowDialog();
}
else
{
DialogResult error = MessageBox.Show("No row selected.", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
}
}
question from:
https://stackoverflow.com/questions/62619932/what-is-a-method-thats-inside-another-method-called 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…