您可以使用一个for循环来封闭包含当前索引的变量:
for(int i = 0; i < buttons.Length; i++)
{
//it's important to have this; closing over the loop variable would be bad
int index = i;
buttons[i].Click += (sender, args) => SomeMethod(buttons[index], index);
}
Run Code Online (Sandbox Code Playgroud)