You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on .net framework or some other issue method
public static bool IsInstantiableCollection(Type colType)
within ReflectionUtils.cs fails somewhere deep in .net guts.
In order to check whether type has default constructor it is sufficient to check for
return colType.GetConstructor(Type.EmptyTypes) != null;
which works nicely without try/catch block.
The text was updated successfully, but these errors were encountered:
Depending on .net framework or some other issue method
public static bool IsInstantiableCollection(Type colType)
within ReflectionUtils.cs fails somewhere deep in .net guts.
In order to check whether type has default constructor it is sufficient to check for
return colType.GetConstructor(Type.EmptyTypes) != null;
which works nicely without try/catch block.
The text was updated successfully, but these errors were encountered: