You are on page 1of 1

E1. Whats the top .NET class to which everything in the Framework is derived?

System.Object
M1. What are the differences between Java and C#? (If Appropriate from the candidates resume)
Someone go to town here
M2. How do you create an event for one of your classes? What kind of class would you implement
to accompany a custom delegate/event?
Define a public delegate. Define an event of the delegate type previously defined. Create a method
that checks to see if an instance of that events delegate has been instantiated and, if so, call the
event. A class derived from EventArgs is normally accompanied with the event that provides
important information internal to the class raising the event.
M3. What are generics? What are the benefits of using them?
Generics provide the ability to perform functions on classes without the generic class knowing of
what type those classes are. The most common use of Generics is the List<T> class which replaces
the ArrayList class. Generics are type safe in that you define the type that will be stored in the List
and only that types members are available when accessing an item from the List. This eliminates
performance hits and errors associated with casting items in an ArrayList in order to use them.
M4. What are the differences between the public, protected, internal and private class member modifiers?
Public is visible to any other class, protected is available to inheriting classes, internal is available to
classes within the same namespace, private is only available within the class it is declared.
M5. What is the difference between the String and StringBuilder classes? When would you want to use
one over the other?
The String class is immutable, so when concatenating two Strings together you are really creating a
new third object in memory. StringBuilder offers a mutable alternative which allows you to
concatenate strings more efficiently.
H1. What is the difference between ref and out parameters?
Ref parameters should be assigned a value by the caller before the method is executed and may be
modified by the callee. Out parameters must be assigned a value by the callee during the method
execution.
H2. What is the difference between static and non-static class members?
There is one instance of a static variable per class. Whereas for non-static variables each object
instantiated contains its own instance. Static methods can be called without instantiating the class,
non-static methods can not. Static constructors will automatically execute before any static variables
are referenced or before any instance of the class is created. Non-static constructors execute each
time a class instance is created.

Programming Concepts/OOAD-OOP (Self Assessment: Section Total: Section Avg: )


E1. Please explain what is commonly known as a three-tier application architecture?
Presentation (or User Interface/Experience), Business, & Data tier
E2. What are the different ways in which code implementation is reused in OOP?
Answers we are looking for are inheritance and delegation or an explanation of both of these
concepts. Answering with polymorphism is wrong as it utilizes overloading versus reusing code
implementation. Interfaces are wrong because there is not implementation of methods/properties
being reused.
M1. Imagine you have a closed Library (meaning you cannot see or change the code) with 2 classes, A
and B. You have been instructed to create a class named C to inherit the functionality of both A and
B such that clients of C can expect all of the behaviors of A and B. How would you implement this
scenario?
Within C, instantiate A and B expose all the public members of both A and B and delegate each call to
C to A or B. An acceptable answer would be to inherit from either A or B and wrap the other as
previously explained.
M2. What is the difference between an interface and an abstract class?
An interface can contain member declarations, but no implementation. An abstract class can contain
implementation. Neither an interface nor an abstract class can be instantiated. A class may
implement multiple interfaces, but may only inherit from one class, abstract or otherwise.
M3. What is the difference between overloading a method and overriding a method?
Overloading a method is when you declare a method with the same name, but a different signature
(parameters). Overriding a method is when you reimplement a method that has been inherited from a
parent class.
M4. What are the benefits of using Interfaces?
H1. Are you familiar with Design Patterns? What patterns have you seen that are built-in to the
implementation of the .NET Framework?
Yes, I am. Some examples are:

You might also like