Instance without class
To use var keyword you need .net framework 3.0 or latest than 3.0using System;
using System.Linq;
{ static int c;
public void Sum(int a, int b)
{
c=a+b;
Console.WriteLine("Sum is :"+c);
}
public static void Main()
{
var m=new car();
m.Sum(2, 4);
}
}
No comments:
Post a Comment