B
Brian
Hi,
According to An Introduction to C# Generics
(http://www.msdn.microsoft.com/vcsharp/default.aspx?
pull=/library/en-us/dv_vstechart/html/csharp_generics.asp)
the AttributeUsage enumeration has a GenericParameter
value.
[AttributeUsage(AttributeTargets.GenericParameter)]
public class GenericAttribute : Attribute
{
}
My question is how do you apply this to a generic type
parameter or the generic class? I've tried using
the "type:" attribute location by applying it to the class
like:
[type: GenericAttribute()]
public class Test<GenericType>
{
}
but that produces the complier error "
Attribute 'BenericAttribute' is not valid on this
declaration type. It is valid on '' declarations only.
But the single quoutes doesn't contain a attribute
location, so is this not implemented yet?
Thanks,
Brian
According to An Introduction to C# Generics
(http://www.msdn.microsoft.com/vcsharp/default.aspx?
pull=/library/en-us/dv_vstechart/html/csharp_generics.asp)
the AttributeUsage enumeration has a GenericParameter
value.
[AttributeUsage(AttributeTargets.GenericParameter)]
public class GenericAttribute : Attribute
{
}
My question is how do you apply this to a generic type
parameter or the generic class? I've tried using
the "type:" attribute location by applying it to the class
like:
[type: GenericAttribute()]
public class Test<GenericType>
{
}
but that produces the complier error "
Attribute 'BenericAttribute' is not valid on this
declaration type. It is valid on '' declarations only.
But the single quoutes doesn't contain a attribute
location, so is this not implemented yet?
Thanks,
Brian