我有一个从 Button() 派生的自定义按钮类:
type Game15Button(position:Point) as button =
inherit Button()
member this.Pozition = position
如何像以下 C# 代码那样在 F# 中创建 Game15Button 按钮数组?
MyButton[] buttons = new MyButton[16];
int i = 0;
for (int y = 0; y < 4; y++)
for (int x = 0; x < 4; x++){
buttons[i] = new MyButton();
buttons[i].Size = new Size(50, 50);
buttons[i].Pozition = new Point(x, y);
i++;
}