C#编程 [英] C# programming

查看:75
本文介绍了C#编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到语法错误,'(' 在以下代码行中。


    if Age> 18    ;   我做错了什么?




hawk6860

解决方案

这是关于SQL Server安装和升级的问题所以C#问题是偏离主题的。一个更好的地方可以提出C#问题是https://social.msdn.microsoft.com/Forums/vstudio / en-US / home?forum = csharpgeneral。


也就是说,你需要在括号中用条件括起有效的C#语法:

 if(年龄> 18)
{
//做点什么
}


I'm getting a Syntax error, '('  on the following line of code.

      if Age > 18         What am I doing wrong?


hawk6860

解决方案

This for up is for questions about SQL Server installation and upgrade so C# questions are off-topic. A better place to ask C# questions is https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral.

That said, you need to enclose conditions in parenthesis for valid C# syntax:

if (Age > 18)
{
   //do something
}


这篇关于C#编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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