3
Answers

C# basics (ATTRIBUTES )

HELLO!!!
I have custom attribute
 
[AttributeUsage(AttributeTargets.Property)]
public class TestAttribute : Attribute
{
public string S;
public TestAttribute()
{
}
}
public class A
{
[Test]
public string str { get; set; }
}
How can I get value of properti in my attribute where i use my attribute?
For example i use my attribute for str properti how can i get str value in my TestAttribute Class? 
Answers (3)