admin管理员组文章数量:1313065
I have a jagged array created from a XSD. The type is:
object[][][] myobject;
Using CodeDom, I want to create some functions and one returns an instance of this object, something like:
object[][] MyItem(int num)=> myobject[num];
But I can't get that type using the CodeDom functions. Though if it was a simple array, like:
object[] myobject;
I could use
CodeTypeReference.BaseType
And I would get
object MyObject(int num)=>myobject[num];
Unfortunately BaseType is specified as follows:
This property contains the name of the type unless it is an array type, in which case it is the array element type.
Note The name of the property may be misleading. This property contains just the type name with any array adornments or generic type arguments removed, not the base or parent type as might be expected. For example, the BaseType value for System.Collections.Generic.Dictionary
2[[System.String], [System.Collections.Generic.List
1[[System.Int32]]]] is System.Collections.Generic.Dictionary`2.
Is it possible in the case of a jagged array to get the real base type which would be in my case?
object[][]
本文标签: cCodeDOm and jagged arrayStack Overflow
版权声明:本文标题:c# - CodeDOm and jagged array - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741915722a2404717.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论