本文介绍了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#中的属性是什么
发布评论