We can write our own definition of a method that already exists in a base
class. This is called method overriding. We have overridden the deposit( ) and
withdraw( ) methods in the savingaccount class so that we can make sure that
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
Unlike C++, C# does not support multiple inheritance. So, in C# every class
has exactly one base class.
Now, suppose we declare reference to the base class and store in it the
address of instance of derived class as shown below.
If we don't want to override base class's virtual method, we can declare it with
new modifier in derived class. The new modifier indicates that the method is
new to this class and is not an override of a base class method.
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
In C#
E.g.
public class ClassA {
public virtual void MethodA() {
Trace.WriteLine("ClassA Method");
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
• Why is the XML InfoSet specification different from the Xml DOM?
What does the InfoSet attempt to solve?
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
• Will finally block get executed if the exception had not occurred?
Yes.
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
• What's the implicit name of the parameter that gets passed into the
class' set method?
Value, and it's datatype depends on whatever variable we're changing.
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
An array has a rank that determines the number of indices associated with
each array element. The rank of an array is also referred to as the dimensions
of the array. An array with a rank of one is called a single-dimensional array.
An array with a rank greater than one is called a multi-dimensional array.
Specific sized multidimensional arrays are often referred to as two-
dimensional arrays, three-dimensional arrays, and so on.
When you create a jagged array you declare the number of rows in your
array. Each row will hold an array that will be on any length. Before filling the
values in the inner arrays you must declare them.
Note that while declaring the array the second dimension is not supplied
because this you will declare later on in the code.
Jagged array are created out of single dimensional arrays so be careful while
using them. Don’t confuse it with multi-dimensional arrays because unlike
them jagged arrays are not rectangular arrays.
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Community Rocks .NET – Interview Questions
Events use delegates so clients can give the application events to call when
the event is fired. Exposing custom events within your applications requires
the use of delegates.
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw