Is there a way around to pass non-constant complex or primitive values to an attribute?
public class SomeClass
{
private SomeOtherClass _someOtherClass = new SomeOtherClass();
private int _somePrimitiveVariable = CalculateSomeValue();
[MyAttribute(InputValue = _someOtherClass)
public void MyMethod()
{
//Some stuff
}
//Or can it be like this?
[MyAttribute(InputValue = _somePrimitiveVariable)
public void MyMethod()
{
//Some stuff
}
}