如何从xsd模式创建.NET类? [英] How do I create .NET class from xsd schema?

查看:114
本文介绍了如何从xsd模式创建.NET类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

i有以下两个类:

Hi there ,
i have two class like following :

public class WebServiceLog
    {
        public string Name { get; set; }
        public int ID { get; set; }
    }

    public class RoleEditLog
    {
        public List<WebServiceLog> OldMethods { get; set; }
        public List<WebServiceLog> NewMethods { get; set; }
        public DateTime EditTime { get; set; }
    }



我如何根据上述类创建.NET类

由XSD2Code自定义生成器?

谢谢



我尝试过的事情:



i不要知道如何使用xsd2code。


how can i create .NET classes according aforementioned classes
by XSD2Code Custom generator?
thanks

What I have tried:

i don't know how to use xsd2code.

推荐答案

您所要做的就是编译程序集并运行XSD.exe,并将程序集的路径作为参数。 XSD.exe /?还列出了所有参数。



示例:



XSD.exe C:\Dev \ Project1 \ Bin \Debug \library.dll
All you have to do is compiling your assembly and run XSD.exe with the path to your assembly as argument. XSD.exe /? has a list of all arguments as well.

Example:

XSD.exe C:\Dev\Project1\Bin\Debug\library.dll


这篇关于如何从xsd模式创建.NET类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆