.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

Is it possible to use base keyword from within the static method?

Posted By :Narayanan     Posted Date :July 30, 2012    Points :40   Category :.NET Framework 
No, you will get error.

You can also find related Interview Question to Is it possible to use base keyword from within the static method?  below: 

Can we call a base class method without creating instance?

Its possible If its a static method.

Its possible by inheriting from that class also.

Its possible from derived classes using base keyword. (More...)

Can you declare an override method to be static if the original method is not static?

No. The signature of the virtual method must remain the same.
(Note: Only the keyword virtual is changed to keyword override). (More...)

what is the purpose of "base" keyword in c# ?

There are two uses
1) used to access a base class constructor
2) used to access a base class member in the derived class. (More...)

Why 'static' keyword is used before Main()?

Program execution starts from Main(). S it should be called before the creation of any object. By using static the Main() can now be called directly through the class name and there is no need to create the object to call it. So Main() is declared as static. (More...)

To define abstract method which keyword is used in VB?

MustOverride keyword is used to define an abstract method in VB. (More...)

Can you declare the override method static while the original method is non-static?

No, you can't, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override. (More...)

What is Static Method?

It is possible to declare a method as Static provided that they don't attempt to access any instance data or other instance methods. (More...)

What is Method overloading?

Method overloading occurs when a class contains two methods with the same name, but different signatures. (More...)

What is Method Overriding? How to override a function in C#?

Use the override modifier to modify a method, a property, an indexer, or an event. An override method provides a new implementation of a member inherited from a base class. The method overridden by an override declaration is known as the overridden base method. The overridden base method must have the same signature as the override method.
You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend