How do I do a get/post for an array in c#?
In C#, you get and set variables like this:
public int ID { get; set; }
How would one get and set an array in C#?
This will not work:
public uint [5] BIG_Hash {get; set;}
How do I do a get/post for an array in c#?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Sep 25, 2012, 2:23 PM EDT
public uint[] BIG_Hash {get; set;}
If you want to initialize the property to an array with 5 elements, then you could set this in the constructor:
class SomeClass
{
public uint[] BIG_Hash {get; set;}
public SomeClass()
{
BIG_Hash = new uint[5];
}
// ...
}