Dprogrammed1

Untitled

Feb 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System;
  2. class emp
  3.   {
  4.       public string name;
  5.       public string address;
  6.       public void display()
  7.       {
  8.           Console.WriteLine("{0} is in city {1}", name, address);
  9.       }
  10.   }
  11.   class Program
  12.   {
  13.       static void Main(string[] args)
  14.       {
  15.           emp obj = new emp();
  16.           obj.name = "Akshay";
  17.           obj.address = "new delhi";
  18.           obj.display();
  19.           Console.ReadLine();
  20.       }
  21.   }
Add Comment
Please, Sign In to add comment