Visual Studio XSD工具:生成集合而不是数组 [英] Visual Studio XSD Tool: Generate Collections Rather Than Arrays

查看:140
本文介绍了Visual Studio XSD工具:生成集合而不是数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio XSD实用程序从XSD生成了一些C#类,并且生成了用于存储元素集合的数组,而不是内置的通用Collection 之一. (或相关)类.

xsd/?中没有提到任何命令行参数?提到任何有关生成集合而不是数组的内容,但是我知道可以使用Visual Studio生成的Web服务代理类来完成,因此我认为这是有可能的.

有人知道如何让XSD实用程序生成集合类而不是数组吗?

解决方案

在寻找答案时找到了这篇文章.我正在使用此工具: http://xsd2code.codeplex.com/

I generated some C# classes from an XSD using the Visual Studio XSD utility and it generated arrays for storing a collection of elements, rather than one of the built-in generic Collection<T> (or related) classes.

None of the command line parameters mentioned in xsd /? mention anything about generating collections rather than arrays, but I know that this can be done with web service proxy classes that Visual Studio generates, so I figured it must be possible.

Does anybody know how to have the XSD utility generate collection classes rather than arrays?

解决方案

Found this post when searching for an answer. I'm using this tool: http://xsd2code.codeplex.com/

这篇关于Visual Studio XSD工具:生成集合而不是数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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