Simple Program
of static variable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyFirst2
{
class A
{
public static void show()
{
Console.WriteLine("Within show of Myfirst2.A");
}
}
}
using System;
using MyFirst2;
namespace MyFirst1
{
class A
{
public static void show()
{
Console.WriteLine("Within show of class A");
}
}
class Program
{
static void show()
{
Console.WriteLine("Within show of Program");
}
static void Main()
{
Console.WriteLine("Hello");
A.show();
show();
}
}
}
No comments:
Post a Comment