技术心得记录:某软件公司面试题c#

简介: 技术心得记录:某软件公司面试题c#

某软件公司面试题c# 【折叠】


名词解释:


1.mvc模式。


2.GAC。


选择题:


1.能用foreach遍历的对象需要实现的是:


a.IEnumerable


b.IEnumerator


c.ICollection


d.ICollectDate


2..net依赖以下哪项技术实现跨语言可用性:


a。CLR


b。CTS


c。CLS


d。CTT


3.。net依赖下面哪项解决com存在的DllHeell问题?


a.Side by side


b.Interop


c.Pinvoke


d.com+


4.framework通过什么与com组件进行交互


a.Side by side


b.webSerivecs


c.Interop


d.Pinvoke


5.一个名空间可以公布多少个装配件?


a.无


b.一个


c.2个


d.任意个


6.匹配空行的正则表达式是


a.\n\r


b.\n【】\r


c.\n【\si】\r


d.\n【\s\rt】\r


7.显示公司列表的应用程序,使用DataGrid控制修改Grid的Footer显示员工合计数,请问怎么做?


a.重写OnPreRerde事件


b.重写OnItemCreater事件


c.重写OnItemDataGrid事件


d.重写Onlayout事件


8.以下那类是int的基类?


a.Int32


b.object


c.ValueType


d.Int16


9.如何使用。net基类库成员不必引用全名称?


a.Include


b.Imports


c.using


d.以上均可以


10.File对象的open Read返回一个什么对象


a.streamReader对象


b.streamWriter对象


c.stream对象


d.file对象


11.。net框架下进行远程通信时,http通道和tcp通道分别采用了什么消息格式?


a.都是xml


b.xml和soap


c.soap和xml


d.xml和二进制


多选:


13.以下正确的是


a.接口可以有虚方法


b.一个类可以实现多个接口


c.接口不能实例化


d.接口可以包含实例的方法


15.c#常用单元测试工具:


a.Cunit


b.junit


c.nunit


d.mbunit


16.以下标记中选择出c#常用的文档注释标记


a.


b.


c.


d.


e.


f.


写出运行结果:


1.


public class Class5


{


static int i = getNum();


int j = getNum();


static int num = 1 ;


static int getNum()


{


return num;


}


static void Main()


{


Console.WriteLine(string.Format("i={0}",i));


Console.WriteLine(string.Format("j={0}",new Class5().j));


}


}


输出:


i=0,j=1


2.


public class Class3


{


static void Main()


{


Console.WriteLine(new Class3());


}


public override string ToString()


{


return string.Format("my name is {0}" + this);


}


}


问答题:


1.string和stringBuilder的区别,为什么同时存在2个类?


2.列举几个重构的方法。


3.使用soap协议与xml web访问器的通信过程。


4.用代码简单描述以下singleton,抽象工厂,Bridage,composite(选2个)设计模式框架。


5.c#如何调用winodws appi,请举出“user32.dll”中的messagebox进行说明。


using System;


namespace ConsoleApplication1


{


///


/// Class4 的摘要说明。


///


abstract class Mybase


{


protected int x =100;


protected int y = 150;


public abstract void myMethed();


public abstract //代码效果参考:http://www.lyjsj.net.cn/wx/art_23621.html

int GetX

{


get;


}


public abstract int GetY


{


get;


}


}


class MyA : Mybase


{


public override void myMethed()


{


x++;


y++;


}


public override int GetX


{


get{return x+10;}


}


public override int GetY


{


get{return y+10;}


}


static void Main()


{


MyA m = new MyA();


m.myMethed();


Console.WriteLine("x={0},y={1}",m.GetX,m.GetY);


}


}


}


输出:x=111,y=161


using //代码效果参考:http://www.lyjsj.net.cn/wz/art_23619.html

System;

namespace ConsoleApplication1


{


///


/// Class5 的摘要说明。


///


public class Class5


{


static int i = getNum();


int j = getNum();


static int num = 1 ;


static int getNum()


{


return num;


}


static void Main()


{


Console.WriteLine(string.Format("i={0}",i));


Console.WriteLine(string.Format("j={0}",new Class5().j));


}


}


}


输出:i = 0 j = 1

相关文章
|
3天前
|
编译器 API C#
技术心得记录:深入分析C#键盘勾子(Hook)拦截器,屏蔽键盘活动的详解
技术心得记录:深入分析C#键盘勾子(Hook)拦截器,屏蔽键盘活动的详解
|
3天前
|
关系型数据库 C# 数据库
技术笔记:MSCL超级工具类(C#),开发人员必备,开发利器
技术笔记:MSCL超级工具类(C#),开发人员必备,开发利器
|
2天前
|
SQL 存储 前端开发
程序技术好文:面试知识点六:JavaWeb
程序技术好文:面试知识点六:JavaWeb
|
2天前
|
XML Java 数据库连接
面试必备!Java核心技术100+面试题
面试必备!Java核心技术100+面试题
|
2天前
|
数据采集 XML 存储
技术经验分享:C#构造蜘蛛爬虫程序
技术经验分享:C#构造蜘蛛爬虫程序
|
2天前
|
C#
一文搞懂:一道关于C#linqwhere的面试题
一文搞懂:一道关于C#linqwhere的面试题
|
3天前
|
存储 C# 索引
技术经验分享:C#入门详解(8)
技术经验分享:C#入门详解(8)
|
3天前
|
SQL 网络协议 Java
技术经验分享:Java不会或做错的面试题总结
技术经验分享:Java不会或做错的面试题总结
11 0
|
3天前
|
Java BI C#
技术笔记:SM4加密算法实现Java和C#相互加密解密
技术笔记:SM4加密算法实现Java和C#相互加密解密
|
3天前
|
监控 C#
技术经验解读:【转】c#实现魔兽(warIII)中显血和改键功能(附源码)(不影响聊天打字)
技术经验解读:【转】c#实现魔兽(warIII)中显血和改键功能(附源码)(不影响聊天打字)