I have a bunch of Java code, and want to convert them to C# code?
esp:
this code:
Java:
private const byte[] map2 = new byte[128];
static
{
for (int i=0; i<map2.length; i++) map2[i] = -1;
for (int i=0; i<64; i++) map2[map1[i]] = (byte)i;
}
To C#
???
???
how to convert it into initlize the const arry?
Sorry my first C# program?
Thanks.
static void MyMethod() {
for (int i=0; i<map2.Length; i++) map2[i] = -1;
for (int i=0; i<64; i++) map2[map1[i]] = (byte)i;
}
That ought to do it.
--
Neil Cowburn
Principal Partner
OpenNETCF Consulting, LLC.
Managed Code in the Embedded World
http://www.opennetcf.com/
http://www.smartdeviceframework.com/
"jeff" <je...@discussions.microsoft.com> wrote in message
news:B3977A91-2625-481B...@microsoft.com...
--
Nino Benvenuti
Device Application Development MVP
http://nino.net/blog
"jeff" <je...@discussions.microsoft.com> wrote in message
news:B3977A91-2625-481B...@microsoft.com...
--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
"jeff" <je...@discussions.microsoft.com> wrote in message
news:B3977A91-2625-481B...@microsoft.com...
I made it according you guys idea.