Outlook表单所需的文本框代码 [英] Textbox code required for Outlook form

查看:186
本文介绍了Outlook表单所需的文本框代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要在选中复选框时文本框应该可见.

我创建了代码,但是它不起作用,

错误:-预期的语句结尾,行号:1

Hello Guys,

I need text box should be visible when checkbox is checked.

I created the code but it''s not working,

Error:- Expected end of statement, Line No:1

private void checkBox1_CheckStateChanged(object sender, EventArgs e)
{
   if(checkbox1.Checked)
   {
      textbox2.Visible = true;
   }
   else
   {
      textbox2.Visible= false;
   }
}



提前致谢



Thanks In advance

推荐答案

问题不同:您抱怨一些代码,但为其他代码提供了示例,但没有问题.此时您需要的是更多的注意力和准确性.函数主体中的所有花括号"{",}"都是多余的,但这根本不是一个错误(有些只是使用这种样式).

另外,我总是建议为事件处理程序使用匿名方法.而且命名非常糟糕,违反了Microsoft的命名约定.同样,这里没有错误.

—SA
The problem is different: you complain about some code, but provide a code sample for some other, which does not have a problem. All you need at this moment is a bit more attention and accuracy. All figure brackets ''{'', ''}'' inside the body of the function are redundant, but this is not a mistake at all (and some just use such style).

Also, I always recommend anonymous methods for event handler. And naming is quite bad, violates Microsoft naming conventions. Again, there is no a bug there.

—SA


这篇关于Outlook表单所需的文本框代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆