具有XML模式的IntelliSense XElement对象 [英] IntelliSense for XElement objects with XML schema

查看:59
本文介绍了具有XML模式的IntelliSense XElement对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在7月的MSDN杂志上阅读名为提高LINQ查询性能"的文章 时,作者指出,在VB中使用Imports为当前项目中的架构提供路径将打开IntelliSense. XElement.在提供的代码中,他使用xelement.@name之类的语句检索属性值等.

Reading an article called "Increase LINQ Query Performance" in July's MSDN magazine, the author states that using an Imports in VB providing a path to schema in the current project will turn IntelliSense on for XElement. In the code provided, he uses statements like xelement.@name to retreive attributes values and so on.

我没有在VB中自己尝试,但我想在C#中使用它.看起来真的像LINQ to XSD.

I did not try this out myself in VB but I would like to use that in C#. This really looks like LINQ to XSD.

C#中是否有等效项?似乎不可能在C#代码中使用名称空间,没有与该Import语句等效的using.

Is there any equivalent in C#? It seems that it is not possible to use a namespace inside C# code, there is no using equivalent to this Import statement.

推荐答案

该帖子声称具有指向视频的链接,该视频显示了如何在C#中使用VB9的XML文字.但是,它只是真正地讨论了它们,并且据我所知,您不能在C#中使用它们. http://blogs.msdn.com/bethmassi/archive/2008/07/03/teched-panel-vb-xml-literals-for-c-developers.aspx

This post claims to have a link to a video that shows how to use VB9's XML Literals in C#. However, it only really discusses them and from what I can gather, you cannot use them in C#. http://blogs.msdn.com/bethmassi/archive/2008/07/03/teched-panel-vb-xml-literals-for-c-developers.aspx

这篇关于具有XML模式的IntelliSense XElement对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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