简体   繁体   English

XDocument验证扩展方法在Visual Studio 2005中不显示

[英]XDocument Validate extension method does not show in Visual Studio 2005

I'm trying to add a schema validation feature to a C# script I made; 我试图将模式验证功能添加到我制作的C#脚本中; it basically loads data from Excel into a XDocument and validates it before saving to file system. 它基本上将数据从Excel加载到XDocument中 ,并在保存到文件系统之前对其进行验证。

I have already added the statement 我已经添加了声明

using System.Xml.Schema;

but the Validate method does does not show in intellisense (Visual Studio 2005). 但是Validate方法不会在智能感知中显示(Visual Studio 2005)。

Any hints? 有什么提示吗?

AFAIK, VS 2005 is for .NET 2.0, and extension methods are only a language feature since .NET 3.0... AFAIK,VS 2005适用于.NET 2.0,而扩展方法仅是.NET 3.0以来的一种语言功能...

Thomas 托马斯

您在项目中引用System.Xml.Linq吗?

Since you are using Visual Studio 2005 you should be using the following class instead. 由于您使用的是Visual Studio 2005,因此应该改用以下类。

.NET 2.0: XMLDocument .NET 2.0: XMLDocument

XMLDocument: Validate Method XMLDocument: 验证方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM