开发者

C# classes to xsd

开发者 https://www.devze.com 2023-03-23 07:23 出处:网络
I am running Visual Studio 2010, I have some classes that I want to export to XSD, (My classes are like structs)

I am running Visual Studio 2010, I have some classes that I want to export to XSD, (My classes are like structs)

Exporting the class in xs开发者_运维百科d will allow me to send this xsd to my clients so that they can create appropriate xml, I will then use this xml to create my class objects.

I think xsd.exe allows me to that, but I cant seem to find the right parameters for the utility.

Please guide, Thanks, Rahil


Example

[System.Xml.Serialization.XmlArrayItemAttribute("item", IsNullable=false)]
public ItemsItem[] items;

C#

xsd.exe -t:PurchaseOrder PurchaseOrder.dll

That should do what you need

0

精彩评论

暂无评论...
验证码 换一张
取 消