public class Demo1
{
int a = 10;
public void ff()
{
int a = 11;
Console.WriteLine("a={0}", this.a);
}
class Program
{
static void Main(string[] args)
{
Demo1 ng = new Demo1();
ng.ff();
Console.WriteLine("Press any key to close........");
Console.ReadKey();
}
}
Output:
-----------------------------------
a=10
Press any key to close........
-----------------------------------
No comments:
Post a Comment