Posted in 面试题 onJune 07, 2015
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
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
C#软件工程师英语面试题
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@