I\'m serializing a class like this
public MyClass
{
public int? a { get; set; }
public int? b { get; set; }
public int? c { get; set; }
}
The simplest way of writing code like this where the exact output is important is to:
xsd.exe
.xsd.exe
again) and check it against your original schema to make sure that the serializer correctly reproduced every behaviour you want.Tweak and repeat until you have working code.
If you are not sure of the exact data types to use initially, start with step 3 instead of step 1, then tweak.
IIRC, for your example you will almost certainly end up with Specified
properties as you have already described, but having them generated for you sure beats writing them by hand. :-)