如何按代码更改按钮的字体大小?

Poo*_*ooh 1 c#

private void arrButton_Click(object sender, EventArgs e)
{
    Button button = (Button)sender;
    if (turn == 0)
    {
        button.Text = "X";
        button.Enabled = false;
        turn = 1;
    }
    else
    {
        button.Text = "O";
        button.Enabled = false;
        turn = 0;
    }
}
Run Code Online (Sandbox Code Playgroud)

我有一个数组按钮,当我按代码调整按钮大小:更大或更小.我想调整字体X的大小,O.如何通过代码?

Moh*_*ara 12

字体大小可以设置如下:

int newSize = 10;
button.Font = new Font(button.Font.FontFamily, newSize);
Run Code Online (Sandbox Code Playgroud)

我希望这有帮助.