Tags / Attributes ?
-
Ok, out of fear of getting flamed for a question that I should probably know the answer too, I'm going to post it anyways ... I read articles from time to time, like this one: http://www.codeproject.com/aspnet/CC\_MultiMediaControl.asp What are (I believe them to be attributes) before the declaration of the property, and what are they used for ... we never covered this in school, at least not yet. IE: _ _ _ Public Property ShowTracker() As Boolean Get Return mShowTracker End Get Set(ByVal value As Boolean) mShowTracker = value End Set End Property Cheers, Xaverian
-
Ok, out of fear of getting flamed for a question that I should probably know the answer too, I'm going to post it anyways ... I read articles from time to time, like this one: http://www.codeproject.com/aspnet/CC\_MultiMediaControl.asp What are (I believe them to be attributes) before the declaration of the property, and what are they used for ... we never covered this in school, at least not yet. IE: _ _ _ Public Property ShowTracker() As Boolean Get Return mShowTracker End Get Set(ByVal value As Boolean) mShowTracker = value End Set End Property Cheers, Xaverian
These attributes are for design time support on your user control - they control the way the property shows in Visual Studio's (or SharpDevelop's) property grid when you put the control on a form using the forms designer. Category: the category the property appears in (if sort by categories is active) Browsable: Whether the property is visible in the property grid. Description: The description shown below the property grid.
-
These attributes are for design time support on your user control - they control the way the property shows in Visual Studio's (or SharpDevelop's) property grid when you put the control on a form using the forms designer. Category: the category the property appears in (if sort by categories is active) Browsable: Whether the property is visible in the property grid. Description: The description shown below the property grid.
Thank you! I thought thats what they were, but wasn't sure, no one has ever explained it to me before. I can see where these can be usefull. Is there somewhere else that I can learn more about additional attributes that are available? I've seen other attributes used as well, especially the "" attribute. Thanks again!
-
Thank you! I thought thats what they were, but wasn't sure, no one has ever explained it to me before. I can see where these can be usefull. Is there somewhere else that I can learn more about additional attributes that are available? I've seen other attributes used as well, especially the "" attribute. Thanks again!
http://www.ondotnet.com/pub/a/dotnet/excerpt/prog_csharp_ch18/index.html?page=1[^] Reflection is key to understanding attributes.
Christopher Pond Innovative Technology Solutions SpartanSoft.net.
-
http://www.ondotnet.com/pub/a/dotnet/excerpt/prog_csharp_ch18/index.html?page=1[^] Reflection is key to understanding attributes.
Christopher Pond Innovative Technology Solutions SpartanSoft.net.