How to find array element type in .net

having an instance of an array type, for example :.

var type = typeof(Guid[]);
if (type.IsArray)
{
    var elementType = type.????
}

I searched for Intellisense information but did not find anything useful, maybe I just missed it.

+3
source share
1 answer
var elementType = type.GetElementType();
+4
source

Source: https://habr.com/ru/post/1778901/


All Articles