I have a property defined as:
public bool[] _array { get; set; }
public bool?[] _null_array { get; set; }
I followed the instructions in How do I determine the underlying type of an array
foreach (var _property in typeof(T).GetProperties())
{
var _propertyType = _property.PropertyType;
var _propertyName = _property.Name;
var CheckArray = _propertyType.IsArray;
var UType = _propertyType.GetElementType().Name;
....
}
The results for UType is:
_array => "Boolean"
_null_array => "Nullable`1"
How do I get the type of an array of nullable primitive ?
Thanks.