Possible Duplicates:
How to initialize array of struct?
Initializing an Array of Structs in C#
C#, Visual studio 2010
I want declare an array of struct and initialize it on the same time but can not get it right How do i write to default initialize an array consisting of structs ?
The following wont go through the compiler but show the idea of what I want to archive
private struct PrgStrTrans_t
{
public int id;
public string name;
public string fname;
}
private PrgStrTrans_t[] PrgStrTrans = { {1, "hello", "there"}, {2, "Fun", thisone"}}
Is it possible at all ?