[Mono-list] DataContractSerializer differs from .Net on Generic class
    Atsushi Eno 
    atsushieno at veritas-vos-liberabit.com
       
    Tue Jun 28 01:58:39 EDT 2011
    
    
  
Hello,
(2011/06/17 18:05), Cocai wrote:
> Hi Atsushi,
>
> After some other test I have discovered:
>   MyGenerics<string>  in .Net become i:type=\"b:SpeakerOfstring\" but in Mono
> is i:type=\"d3p1:SpeakerOfString\" (note how is written OfString)
>
> I have tried with [DataContract(Name = "MyGenericsOf{0}")] that in .Net
> eliminate the random suffix, but in Mono I received this exception by
> DataContractSerializer: "System.Argument Exception: localName must be a
> valid NCName."; the problem is with "{0}".
> Also, If I define the derived class
> pubblic class NewMyGenerics : MyGenerics<MyClass>
Oh, didn't know that such "{0}" could work to fill generic type args. 
I'll implement it. Thanks for the info.
Atsushi Eno
    
    
More information about the Mono-list
mailing list