private const byte[] map2 = new byte[128];
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" <(E-Mail Removed)> wrote in message
news:B3977A91-2625-481B-87D4-(E-Mail Removed)...
> Hi Guys,
>
> 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.
>
>
>