c# - Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'Type[]' to 'Type'? -



c# - Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'Type[]' to 'Type'? -

i error after created class xsd file using xsd.exe tool. searched net , found solution. here link: http://satov.blogspot.com/2006/12/xsdexe-generated-classes-causing.html

problem makes code run, somehow deserialized info seems corrupt. did site suggests , in end 2nd array dimension empty (see comments of site, had problem). question is, how solve issue now? there tool create xsd file? tried xsd2code, without success.

thanks :-)

you need alter type of fellow member variable in serialized class. illustration if raising error like:

unable generate temporary class (result=1). error cs0030: cannot convert type 'data[]' 'data'.

i ran search on info type name in generated file, , found this:

[system.xml.serialization.xmlarrayitemattribute("data", typeof(data), isnullable=false)] public data[][] row

replace data[][] data[] - alter type of info 2d array 1d array. solve problem. :)

c# xsd xml-deserialization

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -