app教程网 综合百科 asp点net(asp . net)

asp点net(asp . net)

首先,定义变量:

String strExample string ('AAA') charchrexample; Character ('a') bool blnexample; Example of time and date of bending piece type (true/false) data; Date type ('September 19th, 2002') IntIntIntExample integer (32-bit signed integer) double dblExample floating point number (64-bit double precision floating point number)

二、各种操作:

=赋值运算加法运算-减法运算*乘法运算/除法运算%模运算逻辑与|||逻辑或!逻辑非

第三,各种结构:

If(条件){}

else{}

Switch (condition) {case option 1:break; Scenario Option 2: Interrupt; }

for(inti=1;i=10I )//特别注意分号{}

While (condition) {}

do{}while(条件);

四、注意事项:

1.习惯了VB的人很容易漏掉句尾的分号;2.习惯VB的人随便用变量但不声明。

在C#中默认情况下这是不允许的;3.向函数:Response传递参数时使用括号。写‘aa’;是不允许的。

我说的几乎不能称之为说语言。学习语言不仅要学习语法,还要学习语言特点。希望你有空的时候可以买一本关于C#的书,研究一下C#作为一门新语言的特点。今天到此为止,

明天再谈WEB控件。

本文来自网络,不代表本站立场,转载请注明出处:https: