东华软件股份公司-NET面试题(试题)

姓名:_____________ 学校:_____________________ 专业:______________________ 学历:__________ 联系方式:______________ E-mail:__________________________ 考试时间:________________________

试卷:____________________________ 满分100分 共20题

阅卷时间:________ 阅卷人:_________ 对___题 错___题 成绩:______________

一.选择题(中文)

1. C#的数据类型有( )

a) 值类型和调用类型;

b) 值类型和引用类型;

c) 引用类型和关系类型;

d) 关系类型和调用类型;

2. int[ ][ ] myArray3=new int[3][ ]{new int[3]{5,6,2},new int[5]{6,9,7,8,3},new int[2]{3,2}}; myArray3[2][2]

的值是( )。

a) 9

b) 2

c) 6

d) 越界

3.以下的C#代码,试图用来定义一个接口:

public interface IFile

{

int A;

int delFile()

{

A = 3;

}

void disFile();

}

关于以上的代码,以下描述错误的是()。

a) 以上的代码中存在的错误包括:不能在接口中定义变量,所以int A代码行将出现错误;

b) 以上的代码中存在的错误包括:接口方法delFile是不允许实现的,所以不能编写具体的实现函数; c) 代码void disFile();声明无错误,接口可以没有返回值;

d) 代码void disFile();应该编写为void disFile(){};

4.下列描述错误的是()

a) 类不可以多重继承而接口可以;

b) 抽象类自身可以定义成员而接口不可以;

c) 抽象类和接口都不能被实例化;

d) 一个类可以有多个基类和多个基接口;

5.接口是一种引用类型,在接口中可以声明(),但不可以声明公有的域或私有的成员变量。

a) 方法、属性、索引器和事件;

b) 方法、属性信息、属性;

c) 索引器和字段;

d) 事件和字段;

二.选择题(英文)

6.You use Visual Studio .NET to develop a Windows-based application. Your application will display customer order information from a Microsoft SQL Server database. The orders will be displayed on a Windows Form that includes a DataGrid control named DataGrid1. DataGrid1 is bound to a DataView object. Users will be able to edit order information directly in DataGrid1. You must give users the option of displaying only edited customer orders and updated values in DataGrid1. What should you do?

A: Set the RowStateFilter property of the DataView object to

DataViewRowState.ModifiedOriginal.

B: Set the RowStateFilter property of the DataView object to

DataViewRowState.ModifiedCurrent.

C: Set the RowFilter property of the DataView object to DataViewRowState.ModifiedOriginal. D: Set the RowFilter property of the DataView object to DataViewRowState.ModifiedCurrent.

7.Another developer in your company uses Visual Studio .NET to create a component named MyComponent. You deploy MyComponent to a server. When you execute MyComponent, you receive the following error message: "System.Security.Policy.PolicyException: Failed to

acquire required permissions." As quickly as possible, you need to discover which permissions are required by MyComponent. What should you do?

A: Request the source code from the developer who created MyComponent. Examine the source code to find the required

permissions.

B: Run the Microsoft CLR Debugger (DbgCLR.exe) on the server to view the permissions requested by the application at run time.

C: Run the Runtime Debugger (Cordbg.exe) on the server to view the permissions requested by the application at run time.

D: Run the Permissions View tool (Permview.exe) on the server to view the permissions required by MyComponent.

E: Run the MSIL Disassembler (Ildasm.exe) on the server to view permission requests by MyComponent that were denied.

8.You use Visual Studio .NET to create an application. Your application contains two classes, Region and City, which are defined in the following code segment. (Line numbers are included for reference only.)

01 public class Region {

02 public virtual void CalculateTax() {

03 // Code to calculate tax goes here.

04 }

05 }

06 public class City:Region {

07 public override void CalculateTax() {

08 // Insert new code.

09 }

10 }

You need to add code to the CalculateTax method of the City class to call the CalculateTax method of the Region class. Which code segment should you add on line 08?

A: CalculateTax();

B: this.CalculateTax();

C: base.CalculateTax();

D: Region r = new Region();

r.CalculateTax();

9.You use Visual Studio .NET to create an application that uses an assembly. The assembly will reside on the client computer when the application is installed. You must ensure that any future applications installed on the same computer can access the assembly. Which two actions should you take? (Each correct answer presents part of the solution. Choose two.)

A:Use XCOPY to install the assembly in the global assembly cache.

B:Use XCOPY to install the assembly in the Windows\Assembly folder.

C:Create a strong name for the assembly.

D:Precompile the assembly by using the Native Image Generator (Ngen.exe).

E:Modify the application configuration file to include the assembly.

F:Use a deployment project to install the assembly in the global assembly cache.

G:Use a deployment project to install the assembly in the Windows\System32 folder.

10.You use Visual Studio .NET to create a component named Request. This component includes a method named AcceptRequest, which tries to process new user requests for services. AcceptRequest calls a private function named Validate.

You must ensure that any exceptions encountered by Validate are bubbled up to the parent form of Request. The parent form will then be responsible for handling the exceptions. You want to accomplish this goal by writing the minimum amount of code.

What should you do?

A: Use the following code segment in AcceptRequest:

this.Validate();

B: Use the following code segment in AcceptRequest:

try {

this.Validate();

}

catch(Exception ex) {

throw ex;

}

C: Use the following code segment in AcceptRequest:

try {

this.Validate();

}

catch(Exception ex) {

throw new Exception("Exception in AcceptRequest", ex);

}

D: Create a custom Exception class named RequestException by using the following code segment:

public class RequestException:ApplicationException {

public RequestException():base() {

}

public RequestException

(string message):base(message) {

}

public RequestException(string message,

Exception inner):base(message, inner) {

}

In addition, use the following code segment in AcceptRequest:

try {

this.Validate();

}

catch(Exception ex) {

throw new RequestException("Exception in

AcceptRequest", ex);

}

三.简答题:

11:.NET中主要有那几种类型的控件,各有什么区别?列举一些常用控件的属性和事件?

12:.NET中主要的类库有那些,以及在实际中的使用方向?

13:介绍 ADO.NET中几个数据库处理的核心对象,以及各自的优缺点。

14:try {}里有一个return语句,那么紧跟在这个try后的finally {}里的code会不会被执行,什么时候被执行,在return前还是后?

15:C#中主要有那几种循环语句,相互之间的区别?

16:软件开发过程一般有几个阶段?每个阶段的作用?

四.数据库

产品表 (主键 ProductID)

ProductID 产品名 单价

1 name1 110

2 name2 220

3 name3 330

4 name4 440

销售计划表(主键 ProductID+客户名 外键:ProductID )

ProductID 客户名 订货数量 销售单价

2 m 2 250

1 n 3 110

3 n 1 300

4 m 2 400

17.是否能删除产品表中的name2?请说明理由与过程。

18.将销售计划表中m客户的产品名为name2的销售单价更换为产品表中相应的单价。

19.求销售计划表中各客户各自的销售总金额的sql语句。

20.求客户中销售总量最大的销售总金额的客户的sql语句

姓名:_____________ 学校:_____________________ 专业:______________________ 学历:__________ 联系方式:______________ E-mail:__________________________ 考试时间:________________________

试卷:____________________________ 满分100分 共20题

阅卷时间:________ 阅卷人:_________ 对___题 错___题 成绩:______________

一.选择题(中文)

1. C#的数据类型有( )

a) 值类型和调用类型;

b) 值类型和引用类型;

c) 引用类型和关系类型;

d) 关系类型和调用类型;

2. int[ ][ ] myArray3=new int[3][ ]{new int[3]{5,6,2},new int[5]{6,9,7,8,3},new int[2]{3,2}}; myArray3[2][2]

的值是( )。

a) 9

b) 2

c) 6

d) 越界

3.以下的C#代码,试图用来定义一个接口:

public interface IFile

{

int A;

int delFile()

{

A = 3;

}

void disFile();

}

关于以上的代码,以下描述错误的是()。

a) 以上的代码中存在的错误包括:不能在接口中定义变量,所以int A代码行将出现错误;

b) 以上的代码中存在的错误包括:接口方法delFile是不允许实现的,所以不能编写具体的实现函数; c) 代码void disFile();声明无错误,接口可以没有返回值;

d) 代码void disFile();应该编写为void disFile(){};

4.下列描述错误的是()

a) 类不可以多重继承而接口可以;

b) 抽象类自身可以定义成员而接口不可以;

c) 抽象类和接口都不能被实例化;

d) 一个类可以有多个基类和多个基接口;

5.接口是一种引用类型,在接口中可以声明(),但不可以声明公有的域或私有的成员变量。

a) 方法、属性、索引器和事件;

b) 方法、属性信息、属性;

c) 索引器和字段;

d) 事件和字段;

二.选择题(英文)

6.You use Visual Studio .NET to develop a Windows-based application. Your application will display customer order information from a Microsoft SQL Server database. The orders will be displayed on a Windows Form that includes a DataGrid control named DataGrid1. DataGrid1 is bound to a DataView object. Users will be able to edit order information directly in DataGrid1. You must give users the option of displaying only edited customer orders and updated values in DataGrid1. What should you do?

A: Set the RowStateFilter property of the DataView object to

DataViewRowState.ModifiedOriginal.

B: Set the RowStateFilter property of the DataView object to

DataViewRowState.ModifiedCurrent.

C: Set the RowFilter property of the DataView object to DataViewRowState.ModifiedOriginal. D: Set the RowFilter property of the DataView object to DataViewRowState.ModifiedCurrent.

7.Another developer in your company uses Visual Studio .NET to create a component named MyComponent. You deploy MyComponent to a server. When you execute MyComponent, you receive the following error message: "System.Security.Policy.PolicyException: Failed to

acquire required permissions." As quickly as possible, you need to discover which permissions are required by MyComponent. What should you do?

A: Request the source code from the developer who created MyComponent. Examine the source code to find the required

permissions.

B: Run the Microsoft CLR Debugger (DbgCLR.exe) on the server to view the permissions requested by the application at run time.

C: Run the Runtime Debugger (Cordbg.exe) on the server to view the permissions requested by the application at run time.

D: Run the Permissions View tool (Permview.exe) on the server to view the permissions required by MyComponent.

E: Run the MSIL Disassembler (Ildasm.exe) on the server to view permission requests by MyComponent that were denied.

8.You use Visual Studio .NET to create an application. Your application contains two classes, Region and City, which are defined in the following code segment. (Line numbers are included for reference only.)

01 public class Region {

02 public virtual void CalculateTax() {

03 // Code to calculate tax goes here.

04 }

05 }

06 public class City:Region {

07 public override void CalculateTax() {

08 // Insert new code.

09 }

10 }

You need to add code to the CalculateTax method of the City class to call the CalculateTax method of the Region class. Which code segment should you add on line 08?

A: CalculateTax();

B: this.CalculateTax();

C: base.CalculateTax();

D: Region r = new Region();

r.CalculateTax();

9.You use Visual Studio .NET to create an application that uses an assembly. The assembly will reside on the client computer when the application is installed. You must ensure that any future applications installed on the same computer can access the assembly. Which two actions should you take? (Each correct answer presents part of the solution. Choose two.)

A:Use XCOPY to install the assembly in the global assembly cache.

B:Use XCOPY to install the assembly in the Windows\Assembly folder.

C:Create a strong name for the assembly.

D:Precompile the assembly by using the Native Image Generator (Ngen.exe).

E:Modify the application configuration file to include the assembly.

F:Use a deployment project to install the assembly in the global assembly cache.

G:Use a deployment project to install the assembly in the Windows\System32 folder.

10.You use Visual Studio .NET to create a component named Request. This component includes a method named AcceptRequest, which tries to process new user requests for services. AcceptRequest calls a private function named Validate.

You must ensure that any exceptions encountered by Validate are bubbled up to the parent form of Request. The parent form will then be responsible for handling the exceptions. You want to accomplish this goal by writing the minimum amount of code.

What should you do?

A: Use the following code segment in AcceptRequest:

this.Validate();

B: Use the following code segment in AcceptRequest:

try {

this.Validate();

}

catch(Exception ex) {

throw ex;

}

C: Use the following code segment in AcceptRequest:

try {

this.Validate();

}

catch(Exception ex) {

throw new Exception("Exception in AcceptRequest", ex);

}

D: Create a custom Exception class named RequestException by using the following code segment:

public class RequestException:ApplicationException {

public RequestException():base() {

}

public RequestException

(string message):base(message) {

}

public RequestException(string message,

Exception inner):base(message, inner) {

}

In addition, use the following code segment in AcceptRequest:

try {

this.Validate();

}

catch(Exception ex) {

throw new RequestException("Exception in

AcceptRequest", ex);

}

三.简答题:

11:.NET中主要有那几种类型的控件,各有什么区别?列举一些常用控件的属性和事件?

12:.NET中主要的类库有那些,以及在实际中的使用方向?

13:介绍 ADO.NET中几个数据库处理的核心对象,以及各自的优缺点。

14:try {}里有一个return语句,那么紧跟在这个try后的finally {}里的code会不会被执行,什么时候被执行,在return前还是后?

15:C#中主要有那几种循环语句,相互之间的区别?

16:软件开发过程一般有几个阶段?每个阶段的作用?

四.数据库

产品表 (主键 ProductID)

ProductID 产品名 单价

1 name1 110

2 name2 220

3 name3 330

4 name4 440

销售计划表(主键 ProductID+客户名 外键:ProductID )

ProductID 客户名 订货数量 销售单价

2 m 2 250

1 n 3 110

3 n 1 300

4 m 2 400

17.是否能删除产品表中的name2?请说明理由与过程。

18.将销售计划表中m客户的产品名为name2的销售单价更换为产品表中相应的单价。

19.求销售计划表中各客户各自的销售总金额的sql语句。

20.求客户中销售总量最大的销售总金额的客户的sql语句


    相关文章

    2010 我的求职经历(完结篇) - .NET技术 / ASP.NET

    新公司刚转正,谈谈自己换工作的面试经历,希望对找工作的朋友有用. 很早以前就想换工作(写过一次面试经历,请参考ASP.NET面试经历分享),但总是因为某些各种原因,未能付诸行动.离开原公司的主要原因还是个人发展的问题(原公司.老板对我还是很 ...

    IT知名企业常见面试题

    IT 名企面试步骤一般为四面:一面:技术面,考核技能水平:二面:综合面:考核综合素质:三面:HR 面,职业规划,优势与劣势,期望工资与工作地点:四面:老总面,最后决定命运. 一. 通用面试例题分析 1. 在学校里你学习了哪些课程,成绩如何? ...

    过程装备与控制工程就业去向一

    过程装备与控制工程就业 去向一 (设计院类) 化工部九大设计院 : 天辰工程公司 (化工部第一设计院) 天津 华泰工程公司 (化工部第二设计院) 太原 东华工程公司 (化工部第三设计院) 合肥 五环工程公司 (化工部第四设计院) 武汉 中石 ...

    大学生资料查询大全

    本文由湿婆之舞李磊贡献 doc文档可能在WAP端浏览体验不佳.建议您优先选择TXT,或下载源文件到本机查看. 大学生查询信息只有你想不到 来源: 崔英慧的日志 大学生查询信息 只有你想不到 英语四级考试网 http://www.cet4v. ...

    东华软件股份公司-java方向综合笔试题2

    姓名:_____________ 学校:_____________________ 专业:______________________ 学历:__________ 联系方式:______________ E-mail:___________ ...

    技术面试之项目经验

    -面试进行曲之技术面试(项目经验) 在前期已经讲过怎样分析自己,对自己进行一个准确的定位,选择一个合适的求职方向!并结合自己的实际个人情况来写一份针对性很强的个人简历!个人简历就是个人的广告!好的简历可以更受到用人需求单位青睐! 好的简历才 ...

    软件技术部经理职责

    行政部经理岗位职责 一.在总经理的领导下,主持行政部职责范围内工作. 二.协助集团领导草拟工作计划.总结.规划.决议.报告.组织起草以集团名义发出的行政公文. 三.协助集团领导组织.安排集团会议,做好记录,检查决议落实情况,及时汇总向集团领 ...

    解答人大软件工程硕士考研学费问题

    解答人大软件工程硕士考研学费问题 人大软件工程硕士考研学费怎么收?这是许多考研学子的烦恼.今天凯程老师详细的介绍一下人大软件工程硕士考研学费.文章也介绍了人大软件工程硕士考研难度,人大软件工程硕士考研就业,人大软件工程硕士考研辅导,人大软件 ...

    中公农业银行招聘面试经验大全

    给人改变未来的力量 中国农业银行招聘面试经验大全安徽中公金融人 农行面试程序 农行面试一般是分组进行的,大体可分两种类型:一是直接发问型;二是案例讨论型. 直接发问型: 一,按相关工作人员的指示签到并抽签,决定分组及小组内每个人发言的顺序及 ...