1

Closed

Null Return From Type.GetGenericArguments()

description

Update #1: A TypeBuilder seems to return null from this method (and the test suite doesn't cover that :( ). Should be simple to cover...
 
The docs say that the method in the title should return an empty array if no generics exist, but DynamicProxies causes a case where this returns null, so I have to have this code in TypeDescriptor.CreateDescriptor()
 
            var genericArguments = type.GetGenericArguments();
 
            if(genericArguments != null && genericArguments.Length > 0)
 
However, I don't have coverage over the return value being null. Need to find out how to do this and add a test around this.
Closed Oct 27, 2008 at 5:12 PM by jasonrbock
Latest check-in addresses this issue.

comments