using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
namespace App7
{
classProgram : My
{
staticvoid Main(string[] args)
{
Add();
Add(2,4);
Demo();
Console.ReadLine();
}
staticvoid Add()
{
Console.WriteLine(2+3);
}
staticvoid Add(intx,int y)
{
Console.WriteLine(x+y);
}
publicstaticvoid Demo()
{
Console.WriteLine("In Main Class.");
}
}
classMy
{
publicstaticvoid Demo()
{
Console.WriteLine("This is in My Class.");
}
}
}
|
OUTPUT 5 6 In Main Class. |
No comments:
Post a Comment