background image

委托可以理解为指向一个函数的引用。
是,是一种特殊的委托

5.override 与重载的区别
答 :
重载是方法的名称相同。参数或参数类型不同,进行多次重载以适应不同的需要
Override 是进行基类中函数的重写。实现多态。

6

如 果 在 一 个 B/S 结 构 的 系 统 中 需 要 传 递 变 量 值 , 但 是 又 不 能 使 用

SessionCookieApplication,您有几种方法进行处理?
答 :
1.使用 QueryString, 如....?id=1; response. Redirect().... 
2.使用 Server.Transfer
3.使用 Cache
4 使用 HttpContext 的 Item 属性
5.使用文件
6.使用数据库

7

.请编程遍历页面上所有 TextBox 控件并给它赋值为 string.Empty

答:
foreach (System.Windows.Forms.Control control in this.Controls)
{

if (control is System.Windows.Forms.TextBox)
{

System.Windows.Forms.TextBox tb = (System.Windows.Forms.TextBox)control ; 
tb.Text = String.Empty ;

}

}

8.请编程实现一个冒泡排序算法?
答:
int [] array = new int [*] ;
int temp = 0 ;
for (int i = 0 ; i < array.Length - 1 ; i++)
{

for (int j = i + 1 ; j < array.Length ; j++)
{

if (array[j] < array[i])
{

temp = array[i] ;
array[i] = array[j] ;
array[j] = temp ;

}

}