Attributes and there constructors...
-
I have a quick question about Attributes When we use the Description attribute we normaly do it like this
[Description("Class that contains information about an user")]
public class user
{}
But how come we can construct the type like Description("") and DescriptionAttribute("") ??? i mean, i can't seem to find the class called Description, when i look with the object browser, but the DescriptionAttribute is there.:confused::confused: I have been looking on MSDN, but nothing seems to popup about this. Anyone have a answer :doh: :doh:
-
I have a quick question about Attributes When we use the Description attribute we normaly do it like this
[Description("Class that contains information about an user")]
public class user
{}
But how come we can construct the type like Description("") and DescriptionAttribute("") ??? i mean, i can't seem to find the class called Description, when i look with the object browser, but the DescriptionAttribute is there.:confused::confused: I have been looking on MSDN, but nothing seems to popup about this. Anyone have a answer :doh: :doh:
stuff surrounded by "[" and "]" are not normal classes. They are class attributes and can be used hundreds of different ways... Look here for more info: http://www.codeproject.com/KB/cs/attributes.aspx[^]
-Spacix All your skynet questions[^] belong to solved
I dislike the black-and-white voting system on questions/answers. X|
-
stuff surrounded by "[" and "]" are not normal classes. They are class attributes and can be used hundreds of different ways... Look here for more info: http://www.codeproject.com/KB/cs/attributes.aspx[^]
-Spacix All your skynet questions[^] belong to solved
I dislike the black-and-white voting system on questions/answers. X|
aha, i see, it seems that the Compiler looks this information up... Quote from (Spacix One) link: The compiler first searches the attribute in System.Attribute derived classes... Hmmm that information i could not find on the MSDN... or im not looking the right places... :) Thanks Spacix One
-
aha, i see, it seems that the Compiler looks this information up... Quote from (Spacix One) link: The compiler first searches the attribute in System.Attribute derived classes... Hmmm that information i could not find on the MSDN... or im not looking the right places... :) Thanks Spacix One
no problem, it is hard to look up something if you don't know its proper name or origin base class :) MSDN has information here: http://msdn.microsoft.com/en-us/library/system.attribute.aspx[^] Look for "abbreviated name"
-Spacix All your skynet questions[^] belong to solved
I dislike the black-and-white voting system on questions/answers. X|
-
no problem, it is hard to look up something if you don't know its proper name or origin base class :) MSDN has information here: http://msdn.microsoft.com/en-us/library/system.attribute.aspx[^] Look for "abbreviated name"
-Spacix All your skynet questions[^] belong to solved
I dislike the black-and-white voting system on questions/answers. X|
yeah i know it can be hard, and i was by that site, but, nothing seemed to popup in my face about this... :-O but now i know, and thats whats counts. ;P