# ASP.NET 学习笔记1

2017-01-07 08:40:20来源:作者:人点击

int i_age
double d_weight
double d_height

int _age
double _weight
double _height

_age.ToString()

string str_a = "33", str_b ="30";
int i_a, i_b;
i_a = Convert. ToInt16(str_a)
(i_a + i_b).ToString();

char chr_a;
chr_a = Convert.ToChar (65)

C#数据类型
String str_Result;
str_Result = str_Name + "今年" + s_Age. ToString() + "岁 <br /> " +
“是否超过30岁: " + b_OutAgeLIne;
int 32位

short 16位
double 取值：小数点后15-16位
float 单精度型 浮点型 f_Weight = 67.5f
Boolean b_OutAgeLine Ture or False
b_OutAgeLine = s_Age > 30;
DateTime dt_Birthday;
dt_Birthday = Convert.ToDateTime ("1901-1-2");

int i_start = 65;

for (int i=0; i < 6; i++) {
chr_a = Convert. ToChar (i_start);
Response.Write (chr_a + "<br />");
i_start ++;
}

a = new int[5]
// int [] a = new int[5]

double [] dA_a;
dA_a = new double [4] {56.34,55.33}

string [] strA_a = new string [4]

a+= b; 等价于 a=a+b;

a%=5; a= a%5; 取余数
X=a++ + b+c; 等同于：X=a+b+c; a=a+1;
X=++a + b + c; 等同于： a=a+1; X= a+b+c;
a-=b;
a*=b;
a/=b;

int i_unit, i_ten,i_cen
for (int i = 100; i<999; i++)
{ i_unit = i % 10;
i_ten = (i/10)%10;
i_cen = i/100;
if (Math. Pow (i_unit,3) + Math.Pow (i_ten,3) + Math.Pow (i_cen,3) = i)
{
str_result += i + ",";
i_count ++;
}
}

Continue 跳出本次循环，执行下一次循环