如題:
public struct KEY_REGION
{
public Keys Min;
public Keys Max;
public KEY_REGION(Keys Min, Keys Max)
{
this.Min = Min;
this.Max = Max;
}
};
這是我宣告的struct
KEY_REGION[] KeyRegion = new KEY_REGION[2]
{ { Keys.NumPad0, Keys.NumPad9 } , { Keys.D0, Keys.D9 }};
我想要宣告個陣列,去存取初始值,可是會build error,
我不知道C#怎麼用struct去存陣列?