首页
讨论区
新职位
搜索论坛
什么's new
新职位
新的个人资料帖子
最新活动
会员
目前的访客
新的个人资料帖子
搜索个人资料帖子
VB.NET社区
登录
登记
什么's new
搜索
搜索
仅搜索标题
经过:
新职位
搜索论坛
Menu
Log in
Register
安装应用
安装
首页
讨论区
C#
C#一般讨论
CS1003错误
您正在使用过期的浏览器。它可能无法正确显示此网站或其他网站。
您应该升级或使用
替代浏览器
.
回复主题
信息
<blockquote data-quote="JohnH" data-source="post: 161" data-attributes="member: 4"><p>You have declared the method static, read about static for example here: <a href="http://msdn.microsoft.com/en-us/library/98f28cdx%28v=VS.100%29.aspx">static (C# Reference)</a></p><p>Basically a static method can not access instance members of a class, for that it would need an object reference of the class.</p><p>Why would you declare an event handler for an object instance static?</p><p></p><p>which is given by code line</p><p></p><p>is expecting the second part of the ?: operator in conditional expression, see <a href="http://msdn.microsoft.com/en-us/library/ty67wk28%28v=VS.100%29.aspx">?: Operator (C# Reference)</a></p><p>?? operator would have been more convenient code-wise, but unfortunately TextBox.Text property returns an empty string when not set and not a null reference.</p></blockquote><p></p>
Insert quotes…
确认
发表回复
首页
讨论区
C#
C#一般讨论
CS1003错误
本网站使用Cookie来帮助个性化内容,调整您的体验并在注册时保持登录状态。
继续使用本网站,即表示您同意我们使用cookie。
接受
了解更多…
最佳
底部