方括号中的一个类[重复](Square brackets in a class [duplicate])
可能重复: 方括号内文字的含义
我正在看的类看起来像
public class SaveBundle { /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public SaveBundleHeader Header { get { return this.headerField; } set { this.headerField = value; } } }我不知道为什么[System.Xml.Serialisztion.Xml等]存在或它被称为进一步研究它?
有人能告诉我[]的名字,在这个例子中它的目的是什么?
Possible Duplicate: Meaning of text between square brackets
The class I'm looking at looks like
public class SaveBundle { /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public SaveBundleHeader Header { get { return this.headerField; } set { this.headerField = value; } } }I don't know why the [System.Xml.Serialisztion.Xml etc] exists or what it is called to research it further?
Can some one tell me the name of [] and what in this example it's purpose is?
最满意答案
它是属性Header上设置的属性XmlElement
您应该能够在MSDN上将其视为XmlElementAttribute 。 像这里一样。
It's the attribute XmlElement being set on the property Header
You should be able to look it up as XmlElementAttribute on MSDN. Like here.
更多推荐
发布评论