This project is read-only.

List of Nullable Type

Mar 2, 2010 at 4:06 PM
Edited Mar 2, 2010 at 4:06 PM

   I am trying to generate client proxies based on an existing WSDL.  Some of the types include fields that are collections of nullable entries.  Using if I generate them as Arrays I get properties like :

private System. Nullable <long>[] fieldName

but If I try to generate Generic list type collections I get something like :

private System.Collections.Generic. List <System. Nullable <>> fieldName

Which obviously fails on comile because of teh missing type in the Nullable generic declaration

Am I missing something?  I can't find any mention in the discussions or issues of something similar.


Mar 7, 2010 at 1:23 PM
Edited Mar 7, 2010 at 1:24 PM

Hi Joe,

This is indeed a bug that has not been reported before. I guess arrays that allow nillable values in not very common. The fix has been checked in and will be included in the next release.

Here is how the generated code will look for the different options.

By default, without the List<T> or Collections option:

public Nullable<int>[] MyArray;

Using the List<T> option:

public List<Nullable<int>> MyArray;

Using the Collections option:

public class NullableInt32Collection : Collection<Nullable<int>>

public NullableInt32Collection MyArray;

Thanks for reporting the bug.




Mar 8, 2010 at 8:50 AM

Thanks Alex,  this might have come up because I'm integrating with a Java based server side so having a reference version of value types has been part of their thinking for a long time now.

BTW congratulations on a great piece of software it's mad my life much easier.