C#中的属性是什么

编程入门 行业动态 更新时间:2024-10-18 14:19:47
本文介绍了C#中的属性是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

什么是属性,为什么我们要使用属性 请提出一些简单而基本的网址 Thanks

What are attributes , Why we are using Attributes please suggest some simple and basic urls thanks

推荐答案

属性定义与类,结构,方法等相关的其他信息(元数据). 例如,您可以定义一个属性,该属性确定类将显示的按钮的类型. 属性是在方括号之间指定的,在它们所应用的项目之前.因此,属性不是类的成员.而是,属性指定附加到项目的补充信息. 请参阅此以获取更多详细信息: msdn.microsoft/en-us/library/aa287992%28v = vs.71%29.aspx [ ^ ] 希望这会有所帮助:) An attribute defines additional information (metadata) that is associated with a class, structure, method, and so on. For example you might define an attribute that determines the type of button that a class will display. Attributes are specified between square brackets, preceding the item to which they apply. Thus, an attribute is not a member of a class. Rather, an attribute specifies supplemental information that is attached to an item. refer this for more details: msdn.microsoft/en-us/library/aa287992%28v=vs.71%29.aspx[^] hope this helps :)

更多推荐

C#中的属性是什么

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

发布评论

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

>www.elefans.com

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