[Mono-devel-list] Static Struct Initialisers?

Michael Adams - CPX Tetra michaela at ComparexAfrica.co.za
Wed Mar 12 04:08:24 EST 2003


I'm trying to create an array of structs and initialise it.
However, this code doesn't compile. 
Any way to do this ?

-----
public struct SPoint
{
  public int x,y;
};

public class CMain
{
  public static void Main()
  {
    SPoint[] List = { {1,2}, {3,4} };
  }
}
----

Regards,
Michael Adams





More information about the Mono-devel-list mailing list