Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


STATIC METHOD CAN BE OVERLOADING AND OVERIDNG? IS POSSIBLE IN
iN c# .NET AND WHAT IS THE REASON??

Answers were Sorted based on User's Feedback



STATIC METHOD CAN BE OVERLOADING AND OVERIDNG? IS POSSIBLE IN iN c# .NET AND WHAT IS THE REASON?? ..

Answer / sudhir sheoran

Static Methods can't be override because static methods can only be accessed using class name and are inaccessible to the objects of the class. So no question of overriding.

But canbe overloaded. See the below example:

class Program
{
static void Main(string[] args)
{
abc.calculate(2, 3);
abc.calculate(2.0, 3.9);
Console.ReadLine();
}
}
public static class abc
{
public static void calculate(int a,int b)
{
Console.WriteLine("Int");
}
public static void calculate(double c,double d)
{
Console.WriteLine("Double");
}
}

Is This Answer Correct ?    25 Yes 1 No

STATIC METHOD CAN BE OVERLOADING AND OVERIDNG? IS POSSIBLE IN iN c# .NET AND WHAT IS THE REASON?? ..

Answer / dinesh sharma

In C# Static Method is Overloaded but not override because override always used in drive class.but in case of static can not provide inheritance.

Is This Answer Correct ?    9 Yes 0 No

STATIC METHOD CAN BE OVERLOADING AND OVERIDNG? IS POSSIBLE IN iN c# .NET AND WHAT IS THE REASON?? ..

Answer / maheshbabuummaneni

STATIC METHOD CANT BE OVERLOAD AND OVERIDE.I DONT NO EXACT REASON.................

Is This Answer Correct ?    4 Yes 12 No

Post New Answer

More C Sharp Interview Questions

What is private variable?

0 Answers  


What is the difference between icomparer and icomparable in c#?

0 Answers  


What is default value of enum c#?

0 Answers  


What is winforms c#?

0 Answers  


Explain the role of Garbage collector and its generations?

0 Answers   MCN Solutions,


What is class method c#?

0 Answers  


Why do we need constructor?

0 Answers  


Why can’t struct be used instead of class for storing entity?

0 Answers  


How long will it take to learn c#?

0 Answers  


Explain the security with aop?

0 Answers  


What is default access specifier for class in c#?

0 Answers  


What is delegate in c# interview questions?

0 Answers  


Categories