- What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and its datatype depends on whatever variable we’re changing.
- How do you inherit from a class in C#?Place a colon and then the name of the base class. Notice that it’s double colon in C++.
- Does C# support multiple inheritance?No, use interfaces instead.
- When you inherit a protected class-level variable, who is it available to? Classes in the same namespace.
- 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.
- 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).
- 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.
- What’s the top .NET class that everything is derived from? System.Object.
- 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.
- What does the keyword virtual mean in the method definition? The method can be over-ridden.
Interview Questions C Sharp set-1
Posted by
study
|
Tuesday, 7 June 2011
Popular Posts
-
52. How do you generate a strong name? .NET provides an utility called strong name tool. You can run this toolfrom the VS.NET command promp...
-
ASP.NET 1.1 Whats the difference between Classic ASP and ASP.NET? Major difference: Classic ASP is Interpreted. ASP.NET is Compiled. I...
-
31. Can a nested object be used in Serialization ? Ans : Yes. If a class that is to be serialized contains references to objects of other c...
-
Explain user defined exceptions in oracle. A User-defined exception has to be defined by the programmer. User-defined exceptions are decla...
-
What is Kernel? Explain the task it performs. Kernel is used in UNIX like systems and is considered to be the heart of the operating sys...
-
TCS Written Paper Q1. Fill in the missing number in the sequence 5 7 11 ?? 35 67 (a) 24 (b) 33 (c) 19 ...
-
What are transaction isolation levels supported by Oracle? Oracle supports 3 transaction isolation levels: a. Read committed (default) b...
-
Explain IP, TCP and UDP. TCP – Transmission control Protocol is used to establish communication between nodes or networks and exchange dat...
-
1. What is the difference between C++ & Java? 2. Explain RMI Architecture? 3. How do you communicate between Applets & Servlets? ...
-
C Preprocessor 9.1: How can I use a preprocessor #if expression to tell if a machine is big-endian or little-endian? #ifdef __BIG_ENDIAN ...

0 comments:
Post a Comment