国双面试题

1、Which attribute can we use to warn(警告) consumers(消费者) that code is outdated(过时的 旧试的)?

A.[Deprecated](不推荐) B.[Obsolete] C.[DoNotUse] D.[OutDated]

 

2、How can we force(强制) reference(引用) equality comparisons between objects?

A.The==operator always compares references

B.Use object.Equals

C.Use object.ReferenceEquals 引用相等性 区别== Equals

D.Use Assert.AreEqual

 

3、Which of the  following  features(以下特性) is still not support by C# ?

A.Language integrated query(语言级级别查询 C#)

B.Functional style programming 函数式编程

C.Mixin (混合类型)

D.Closure(闭包 C#)

 

4、What modifier(修饰) allows us to pass an arbitrary(随意的) number of  arguments to method(参数方法)?

A.list B. multi C.params D.Multiparam

 

5、Whitch calss can we use to convert base types to binary byte arrays?把基本类型转化为二进制数组

A.Convert B.ByteArrayConverter C.BitConverter D.BinaryConverter

 

6、What constraint(约束) would we use to ensure a generic(确保 泛型)  type parameter “T” was  always a reference type?

A.where T:ref B.where T:reference C.where T:class D. where T:struct

 

7、Can we have generic methods in non-generic classes? 非泛型类 里面的泛型方法

A.No B.Yes C.Yes only if the class is abstract D.Yes only if the class is sealed

 

8、Which class can be used to perform(执行) atomic,processor-independent updates of word-sized data?

A.System.Threading.Mutex B.System.Threading.Interlocked

C.System.Threading.WaitHandle  D.System.Threading.ThreadPool

 

9、What is the name of the data structure(数据结构) that the finalizer(终结函数) thread picks(选择) objects from?

A.Disposable queue B.F-reachable queue C.Graveyard queue D.Finalization queue

 

10、Which new garbage collector does .NET 4.0 introduce(采用)

A.Server GC B.Background GC C.Low fragmentation(分裂) GC D.Workstation GC

 

11、When are assemblies(程序集) unloaded from an application domain? 应用程序什么时候去加载程序集

A.Nerver B.When the application domain is unloaded

C.By calling the Unload method on the assembly

D.When the assembly file is deleted

 

12、What is the primary reason thread synchronization(同步) techniques(技术) are required?

A.To prevent(预防) performance(性能) issuses流出

B.Most modern machines have more than one processor(处理器) or core

C.To reduce memory consumption

D.Most resources are not meant to be accessed访问 concurrently 同时的

 

13、What is an advantage优势 to using events versus exposing公开 delegates publicly?

A.Events do not  use delegates

B.Events are available to other .NET languages but delegates are only  available in C#

C.Events prevent external clients from subscribing to the delegate

D.Events encapsulate the delegate and prevent external objects from invoking it directly

 

14、Which  of the following statements does not help UI thread marshaling(调度排列)?

A.Form.BeginInvoke B.Delegate.BeginInvoke C.Dispatcher.BeginInvoke(WPF) D.SynchronizationContext.Post同步上下文

 

15、Which design pattern helps to achieve实现 double dispatch分派?

A.Bridge.Pattern B.Adapter Pattern C.Visitor Pattern D.Iterator Pattern E.Chain-Of-Responsibility Pattern

 

16、Task.ConfigureAwait(bool) is introduces in .Net 4.5 Please explain what it does.

 

 

17、Please write a small program to reverse a linked list.

Class Node

Object Value{get;set;}

Node Next {get;set;}

Should return the head node of the new reversed linked list node reverse(node headnode)

posted @ 2017-03-02 13:16  干饭人~  阅读(557)  评论(2编辑  收藏  举报