开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜