20
1
using System;
2
3
//this is class
4
public class Program
5
{
6
//this is main method, which is also static
7
public static void Main()
8
{
9
//static method
10
AddTwoNumber();
11
}
12
//we have used static keyword, so we don't need to class it's class object
13
public static void AddTwoNumber()
14
{
15
16
int a=10, b=20;
17
int c= a+b;
18
Console.WriteLine("Sum ="+c);
19
}
20
}
Cached Result