1.What is a pre-requisite for
connection pooling?
Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.
Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.
2.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.
Value, and it’s datatype depends on whatever variable we’re changing.
3. How do you inherit from a class
in C#?
Place a colon and then the name of the base class.
Place a colon and then the name of the base class.
4.Does C# support multiple
inheritance?
No, use interfaces instead.
No, use interfaces instead.
5.When you inherit a protected
class-level variable, who is it available to?
Classes in the same namespace.
Classes in the same namespace.
6.Are private class-level
variables inherited?
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
7.Describe the accessibility
modifier protected internal.
It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
8.C# provides a default
constructor for me. I write a constructor that takes a string as a parameter,
but want to keep the no parameter one. How many constructors should I write?
Two. Once you write at least one constructor, C# cancels the freebie
constructor, and now you have to write one yourself, even if there’s no
implementation in it.
9.What’s the top .NET class that
everything is derived from?
System.Object.
System.Object.
10.How’s method overriding
different from overloading?
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.