S
Sajjad Akhter
If i try to set any named param in attribute declartion which is not string
or number type i get error that its not valid param etc
here is example code
I need to create some constant fields those are of object type (other than
value types)
public class TestData10
{
public TestData10(string name)
{}
public string Airport;
}
Class MyAttribute: Attribute
{
Public TestData10 Data{get {return new TestData10(); } set{}}
}
Class test
{
[My(Data= new TestData10 () )]
Void DoesntWorkBeacuseExpressionIsNotConst() {}
[My(Data.Airport = "Sea"]
Void
AgainGivesStrangeErrorsThatDataIsNotApproprieatparamEtc(){}
}
or number type i get error that its not valid param etc
here is example code
I need to create some constant fields those are of object type (other than
value types)
public class TestData10
{
public TestData10(string name)
{}
public string Airport;
}
Class MyAttribute: Attribute
{
Public TestData10 Data{get {return new TestData10(); } set{}}
}
Class test
{
[My(Data= new TestData10 () )]
Void DoesntWorkBeacuseExpressionIsNotConst() {}
[My(Data.Airport = "Sea"]
Void
AgainGivesStrangeErrorsThatDataIsNotApproprieatparamEtc(){}
}