Syntax for applying custom attributes to properties?
given this example in c#, how would it be expressed in JScript?
[Attribute1]
public int TestProperty
{
[Attribute2] get {return 0;}
[Attribute3] set {testProperty=value;}
}
given this example in c#, how would it be expressed in JScript?
[Attribute1]
public int TestProperty
{
[Attribute2] get {return 0;}
[Attribute3] set {testProperty=value;}
}
It seems like this syntax documentation is a bit hidden (see [1] for an example). So here it goes:
Attribute1() Attribute1()
Attribute2()
public function get TestProperty() : int {
return 0;
}
Attribute2()
public function set TestProperty(value : int) {
testProperty = value;
}
hth,
-- b.gr
[1] http://msdn2.microsoft.com/library/e8kc3626(en-us,vs.80).aspx