Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication3
- {
- class anas
- {
- private string name;
- private int age;
- public string Name
- {
- get { return name;}
- set { name=value;}
- }
- public int Age
- {
- get { return age;}
- set { age=value;}
- }
- public override string ToString()
- {
- return "Name = " + Name + ", Age = " + Age ;
- }
- public static void Main(string[] args)
- {
- anas a = new anas();
- a.name = "anas";
- a.age = 19;
- Console.WriteLine(a);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement