方括号中的一个类[重复](Square brackets in a class [duplicate])

编程入门 行业动态 更新时间:2024-10-26 12:30:40
方括号中的一个类[重复](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.

更多推荐

本文发布于:2023-08-04 08:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1412748.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方括号   Square   brackets   class   duplicate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!