1 / 18
文档名称:

历年成人高考高起点语文试题及答案(19972011年).doc

格式:doc   页数:18页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

历年成人高考高起点语文试题及答案(19972011年).doc

上传人:wc69885 2015/6/2 文件大小:0 KB

下载得到文件列表

历年成人高考高起点语文试题及答案(19972011年).doc

相关文档

文档介绍

文档介绍:第二章 C#语法及相关知识回顾
一、语句
1、声明语句:声明语句引入新的变量或常量。变量声明可以选择为变量赋值。在常量声明中必须赋值。
// 变量申明
double area;
double radius = 2;
// 常量申明
const double pi = ;
2、表达式语句:用于计算值的表达式语句必须在变量中存储该值。
area = * (radius * radius);
3、选择语句:选择语句用于根据一个或多个指定条件分支到不同的代码段。
A、if语句
bool result = true;
if (result == true)
{
("The variable is set to true.");
}
else
{
("The variable is set to false.");
}
if (Condition_1)
{
// Statement_1;
}
else if (Condition_2)
{
// Statement_2;
}
else if (Condition_3)
{
// Statement_3;
}
else
{
// Statement_n;
}
B、swith语句
int caseSwitch = 1;
switch (caseSwitch)
{
case 1:
("Case 1");
break;
case 2:
("Case 2");
break;
default:
("Default case");
break;
}
4、迭代语句(循环语句)
A、do语句
public class TestDoWhile
{
public static void Main ()
{
int x = 0;
do
{
(x);
x++;
} while (x < 5);
}
}
B、for语句
class ForLoopTest
{
static void Main()
{
for (int i = 1; i <= 5; i++)
{
(i);
}
}
}
for (; ; )
{
// ...
}
C、foreach语句
class ForEachTest
{
static void Main(string[] args)
{
int[] fibarray = new int[] { 0, 1, 2, 3, 5, 8, 13 };
foreach (int i in fibarray)
{
(i);
}
}
}
D、while语句
class WhileTest
{
static void Main()
{
int n = 1;
while (n < 6)
{
("Current value of n is {0}", n);
n++;
}
}
}
二、页面
1、页面概述
页面的扩展名为aspx
模块() 处理扩展名为aspx、ascx、asmx的文件c:\windows\\framework\\
2、中编写代码方式
A、流模式
支持<%%>处理指令, 文件内将 HTML 内容与<% %> 代码呈现块混合
<% ***@Page Language="C#" %>
<HTML>
<HEAD>
<TITLE>编程模型实例</title>
</head>
<body>
<center>
<%
="HTML 服务器控件演示";
%>
<span id="message" runat=server/>
</center>
</body>
</html>
B、代码嵌入模式
<script>,代码块中包含了函数的定义比如事件处理函数的定义,那么我们不能使用<%%>指令,而应该使用<script></script>指令
<body>
<script langu