why user defined static methods are not posible to call with object ?

Posted by Harieswer under C# on 5/30/2015 | Points: 10 | Views : 1035 | Status : [Member] | Replies : 1
class Sample
public static void main(String args[])
Console.WriteLine("welcome to dotnet");
Sample s=new Sample();
public void norm()
Console.WriteLine("checking inside method of main class");
public static void norms()
Console.WriteLine("checking the static method");




Posted by: Yesi on: 6/3/2015 [Member] Starter | Points: 25

Your question is not clear, u mean why static methods are not possible to call with object ?actually we use object to call them,and they can't be altered.

Free .NET WORD library http://www.e-iceblue.com/Introduce/word-for-net-introduce.html supporting editing and conversion of Word files.

Harieswer, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response