分享

C#软件工程师英语面试题

 kittywei 2012-08-21
1 True or false: both instance properties and static properties are allowed? True
2 True or false: a static method can access instance members? False.
3. It is considered good style to explicitly invoke the garbage collector whenever an object allocated on the heap goes out of scope? True
4 Determining if two references refer to the same object should be done using: The Equals method.
5 In Exceptions, the catch and finally constructs may be associated with the same try block. True.56
6 If a method is marked as protected internal who can access it?
Classes that are both in the same assembly and derived from the declaring class.
7. What’s the difference between the Debug class and Trace class?
8. When should you call the garbage collector in .NET?

9 What is encapsulation??
Containing and hiding information about an object, such as internal data structures and code. Encapsulation isolates the internal complexity of an object’s operation from the rest of the application. For example, a client component asking for net revenue from a business object need not know the data’s origin.
What is inheritance?
Inheritance allows one class to reuse the state and behavior of another class. The derived class inherits the properties and method implementations of the base class and extends it by overriding methods and adding additional properties and methods.
What is Polymorphism??
Polymorphism allows a client to treat different objects in the same way even if they were created from different classes and exhibit different behaviors.
You can use implementation inheritance to achieve polymorphism in languages such as C++ and Java. Base class object’s pointer can invoke methods in derived class objects.
You can also achieve polymorphism in C++ by function overloading and operator overloading.

10 What is a virtual method?
the implementation of a virtual method can be superseded by derived classes. The process of superseding the implementation of an inherited virtual method is known as overriding that method

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多