Menu

#6 jagged arrays

open
nobody
None
5
2006-11-28
2006-11-28
Anonymous
No

int[][] a = new int[][] {
new int [] {1, 2, 3}
};

C# compiler emits <PrivateImplementationDetails> which is currently not supported

Discussion

  • Nobody/Anonymous

    Logged In: NO

    it seems, that <PrivateImplementationDetails> is not always used.

    Also this issue relates to the string switch branch support.

    See more at http://blogs.ugidotnet.org/adrian/archive/2005/04/02/13454.aspx

     
  • Nobody/Anonymous

    Logged In: NO

    it has been confirmed that even enforces the private region to occur

    int[][] a = new int[8][];

    a[0] = new int[] { 1, 2, 3 };

     
  • Nobody/Anonymous

    Logged In: NO

    workaround can be (jsc needs to be modified tho):

    int[][] a;

    a = new int[][8];
    a[0] = new int[3];
    a[0][0] = 1;
    a[0][1] = 2;
    a[0][2] = 3;

     
  • Nobody/Anonymous

    Logged In: NO

    int[] g1 = new int[] { 140, 0xff, 0x12, 110 };

    will generate

    L_014b: ldtoken <PrivateImplementationDetails>{A3686CDA-434E-4F65-8265-6EF33077D9CC}/__StaticArrayInitTypeSize=16 <PrivateImplementationDetails>{A3686CDA-434E-4F65-8265-6EF33077D9CC}::$$method0x600000d-1
    L_0150: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray([mscorlib]System.Array, [mscorlib]System.RuntimeFieldHandle)

    current implementation will fail resolving this.

     

Log in to post a comment.

MongoDB Logo MongoDB