21
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
8
//create class instance
9
Program p= new Program();
10
//call method using class instance created above
11
p.AddTwoNumber();
12
}
13
//void is return type, means it will not return anything
14
//public is acces type, means it can be accessed from anywhere in the program
15
public void AddTwoNumber()
16
{
17
int a=10, b=20;
18
int c= a+b;
19
Console.WriteLine("Sum ="+c);
20
}
21
}
Cached Result
Dictionary after adding values:
Key: linux Value:1
Key: windows Value:2
Key: mac Value:3
Dictionary after removing a value:
Key: linux Value:1
Key: windows Value:2
Key: linux Value:1
Key: windows Value:2
Key: mac Value:3
Dictionary after removing a value:
Key: linux Value:1
Key: windows Value:2