CSharp examples for System:Type
Get Underlying Type
using System.Threading.Tasks; using System.Text; using System.Reflection; using System.Linq; using System.Collections.Generic; using System.Collections; using System;/*from ww w . java 2s.co m*/ public class Main{ public static Type GetUnderlyingType(Type arrayType) { if (!IsArray(arrayType)) throw new NotImplementedException(); return arrayType.GetGenericArguments()[0]; } }