Asp.Net Corner

  • Home
  • Contact Us
  • JQuery
    • Dvd
    • Games
    • Software
      • Office

Monday, 24 August 2015

Advanced C# Interview Questions And Answers Part 4

 August 24, 2015     No comments   

1.) How do we inherit from a class in c# ?
In c#, we use a colon (:) and then the name of the base class.

2.) Does c# support multiple inheritance ?
No, we use interface for this purpose.

3.) Are private class -label variables inherited ?
Yes, but it is not accessible.we generally know that they are inherited but not accessible.

4.) What is the implicit name of the parameter that gets passed into class "set" method ?
Value and it's datatype(it depends whatever variable we are changing).

5.) What is the top .NET class ?
System.Object

6.) How does method overloading different from overriding ?
A method overloading simply involves having a method with the same name within the class. whereas in method overriding we can change method behaviour for a derived class.

7.) Can we override private virtual method ?
No.

8.) Can we declare the override method static while the original method is non static ?
No.

9.) Can we prevent my class from being inherited and becoming a base class from the other classes ?
Yes.

10.) What is an interface class ?
This is an abstract class with public abstract methods , all of which must be implemented in the inherited classes.

11.) Can we inherit multiple interfaces ?
Yes.

13.) What is signature used for overloaded a method ?
Use different data types Use different number of parameters Use different order of parameters

14.) What is the difference between an interface and abstract class ?
In an interface, all methods must be abstract but in abstract class some methods can be concrete.In interface No accessibility modifiers are alloweded but in abstract class a accessibility modifier are alloweded.
.

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • General .NET Questions And Answers Part 1
    1.) What is .NET ? ....
  • Jquery Interview Question and ans
    Q6. Is jQuery a W3C standard? Ans: No. jQuery is not a W3C standard.   Q7. What is the basic need to start with jQuery? Ans: To start ...
  • (no title)
    1. What is the use of jQuery filter? The jQuery filter is used to filter the certain values from the object list based on the criteria. ...

Recent Posts

Categories

  • Interview
  • Question

Pages

  • Home

Text Widget

Blog Archive

  • ►  2017 (7)
    • ►  August (2)
    • ►  July (5)
  • ▼  2015 (8)
    • ▼  August (5)
      • Advanced C# Interview Questions And Answers Part 4
      • Advanced C# Interview Questions And Answers Part 3
      • Advanced C# Interview Questions And Answers Part 2
      • Advanced C# Interview Questions And Answers Part 1
      • 1.) What is .NET Assembly ? ...
    • ►  July (3)

Categories

  • Interview
  • Question

For More Updates Follow Us

Unknown
View my complete profile

Featured post

Jquery Interview Question and ans

Q6. Is jQuery a W3C standard? Ans: No. jQuery is not a W3C standard.   Q7. What is the basic need to start with jQuery? Ans: To start ...

Contact Form

Name

Email *

Message *

Copyright © Asp.Net Corner | Powered by Blogger
Design by Hemil Bhavsar | Blogger Theme by aspdotnetcorner.blogspot.in