zoukankan
html css js c++ java
从今天开始学习 C#
第一次写C#,发现C#语法有很多奇怪的地方,括号一多头都看晕了。
我的第一个C#代码
public
partial
class
_Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
{
Response.Write(
"
====================循环语句1=======================<p>
"
);
int
i
=
0
;
for
(i
=
0
; i
<
10
; i
++
)
{
Response.Write(i
+
"
<br>
"
);
}
Response.Write(
"
==================循环语句2=========================<p>
"
);
string
[] arr1
=
{
"
str1
"
,
"
str2
"
,
"
str3
"
}
;
int
t
=
0
;
for
(t
=
0
; t
<
arr1.Length; t
++
)
{
Response.Write(arr1[t]
+
"
<br>
"
);
}
Response.Write(
"
=====================条件语句1======================<p>
"
);
string
str3
=
"
xm
"
;
string
str4
=
"
fj
"
;
Response.Write(
"
str3=xm
"
+
"
"
+
"
str4=fj
"
);
if
(str3
==
str4)
{
Response.Write(
"
A
"
);
}
else
{
str3
=
str4;
}
Response.Write(str3);
Response.Write(
"
<p>=====================条件语句2======================<p>
"
);
int
caseSwitch
=
1
;
switch
(caseSwitch)
{
case
1
:
Response.Write(
"
Case 1
"
);
break
;
case
2
:
Response.Write(
"
Case 2
"
);
break
;
default
:
Response.Write(
"
Default case
"
);
break
;
}
}
}
}
查看全文
相关阅读:
排序算法之直接插入排序
排序算法之快速排序
进程内存空间
python基础13 ---函数模块3(正则表达式)
python基础12 ---函数模块2
python基础11 ---函数模块1
python基础10 ---匿名函数和递归
python基础9 -----python内置函数2
python基础8 -----迭代器和生成器
python基础7 ---python函数
原文地址:https://www.cnblogs.com/LCX/p/371455.html
最新文章
Eclipse+Maven创建webapp项目<一><二><三>
最大化 AIX 上的 Java 性能,第 5 部分: 参考资料和结论
通过 Javacore 诊断线程挂起等性能问题
python2 生成验证码图片
python3 计算文件夹中所有py文件里面代码行数,注释行数,空行数
python3 str和bytes转换
python3 批量缩放图片为iphone5的640*1136以下
python 统计单词出现次数
python3 生成随即激活码
python3 pillow使用测试
热门文章
python3里面的图片处理库 pillow
python发布包流程
python3.x中如何实现print不换行
技术大牛面试 http://www.itmian4.com/forum.php?mod=viewthread&tid=3824
总结实习经历,为以后面试准备
信号量与PV操作
面试失败小结
缓存淘汰算法---LRU
CPU与外设传送数据方式
排序算法之希尔排序
Copyright © 2011-2022 走看看