Hello,

It seems that I've found an inconsistency concerning arrays versus
multidimensional arrays. The following code illustrates the issue:

        public string IndexerMethod()
        {
            string[] singleDimension = new[] { "x" };
            string[,] multipleDimension = new[,] { { "x" } };
            return singleDimension[0] + multipleDimension[0, 0];
        }

Analyzing the IL code of the above method body only results in three
method references which when resolved are:

{System.Void System.String[,]::Set
(System.Int32,System.Int32,System.String)}
{System.String System.String[,]::Get(System.Int32,System.Int32)}
{System.String System.String::Concat(System.String,System.String)}

Which leads me to believe that single dimensional arrays are handled
differently then multidimensional arrays in Mono.Cecil. Is this true?

The secondary problem is then how do i look up the type definition for
the type "String[,]"... isn't this type really just System.Array,
which has the following members:

SetValue(Object, array<Int32>[]()[])
GetValue(array<Int32>[]()[])

- Martin
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to