System.Configuration.DefaultSettingValueAttribute
[global::System.Configuration.DefaultSettingValueAttribute("s")]
The string "s"
must be constant. How can I pass a variable s开发者_运维知识库tring?
I mean I want it like this:
[global::System.Configuration.DefaultSettingValueAttribute(s1+"s")]
and s1
is a string.
You cannot. Like the error message says, a parameter to an attribute must be a constant value, known at compile time.
精彩评论