B
babylon
I can't do
public const short[] test = new short[]{1000,2000,3000};
any suggestions?
thx
public const short[] test = new short[]{1000,2000,3000};
any suggestions?
thx
babylon said:any suggestions?
any suggestions?
public readonly short[] test = new short[] {1000, 2000, 3000};
--
There are 10 kinds of people. Those who understand binary and those who
don't.
http://code.acadx.com
(Pull the pin to reply)
Don Dumitru said:If you have a really complicated init that you need to run for a const
member, you can write a static method which returns the result.
private static short[] InitTest() {
short[] res = null;
// do lots of complicated stuff here
return res;
}
public const short[] test = InitTest();