C#.NET INTERVIEW QUESTION & ANSWERS
DOT Net
TAGS
11. | What are the different accessibility levels defined in .NET? |
---|---|
There are Five levels of Access Modifiers are :
|
Posted by Aswini Aluri. (Nov 20, 2013) | |
1.private 2.protected 3.internal 4.protected internal 5.public these access modifiers are used in c#.net friend access modifier is used in vb.net |
|
Posted by Sandeep Singh Tomar. (Apr 27, 2013) | |
1) Private 2) Public Protected 3) Internal 4) Protected internal |
12. | Can I use exceptions in C#? |
---|---|
Yes, in fact exceptions are the recommended error-handling mechanism in C# (and in .NET in general). Most of the .NET framework classes use exceptions to signal errors. |
13. | What are the types of comment in C#? |
---|---|
|
14. | What is the difference between an interface and abstract class? |
---|---|
In an Interface class, all methods must be abstract. In an Abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed, which is ok in an abstract class. |
Posted by Arun. (Jun 29, 2014) | |
An abstract class doesn’t provide full abstraction but interface provides full abstraction. using abstract class can not achieve multiple inheritance but in interface can achieve multiple inheritance. |
15. | Can we have shared events? |
---|---|
Yes, you can have shared events note only shared methods can raise shared events. |