Is there a way to do the following? I see that the Attribute Arguments must be a constant expression, so how would I work around this? If I dont want to load some properties into a datagridview using binding, whats the next best alternative?
class TestObj
{
private bool isBrowsable = false;
[Browsable(isBrowsable)]
public string String1
{
get
{
return "Foo";
}
}
[Browsable(isBrowsable)]
public string String2
{
get
{
return "Baz";
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…