Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class neighbor
- {
- public String FirstName;
- public String LastName;
- public int age;
- public double heigth;
- public string sex {
- set
- {
- switch (sex.ToLower())
- {
- case "m":
- sex = "male";
- break;
- case "f":
- sex = "female";
- break;
- }
- }
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- string fName = Convert.ToString(Console.ReadLine());
- string lName = Convert.ToString(Console.ReadLine());
- int _Age = Convert.ToInt32(Console.ReadLine());
- Double _Heigth = Convert.ToDouble(Console.ReadLine());
- string _sex = Convert.ToString(Console.ReadLine());
- neighbor Neighbor = new neighbor()
- {
- FirstName = fName;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement