Why do we use static methods in c#?



Why do we use static methods in c#?..

Answer / Sangeeta Singh

Static methods in C# are used to provide functionality that doesn't require an instance of the class. They can be called directly from their containing class and don't have access to non-static class members.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is the use of console application in c#?

1 Answers  


directcast(123.34,integer) - should it throw an error? Why or why not?

2 Answers   Wipro,


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

3 Answers   IBM, TCS,


What is the and operator in c#?

1 Answers  


What is check/uncheck?

1 Answers  


How can I get the ascii code for a character in c#?

1 Answers  


If u declare two interfaces withsame methodnmae .prototype how can u call the particular method from class?

4 Answers   Microsoft,


what is c# command?

1 Answers  


what is the difference between the debug class and trace class?

1 Answers   Rolta,


How?s the DLL Hell problem solved in .NET?

1 Answers   Visual Soft,


Describe ado.net?

1 Answers  


What are interfaces in c#?

1 Answers  


Categories