Advertisement
Guest User

аіаіаіа

a guest
Apr 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1. class neighbor
  2.     {
  3.         public String FirstName;
  4.         public String LastName;
  5.         public int age;
  6.         public double heigth;
  7.         public string sex {
  8.             set
  9.             {
  10.                 switch (sex.ToLower())
  11.                 {
  12.                     case "m":
  13.                         sex = "male";
  14.                         break;
  15.                     case "f":
  16.                         sex = "female";
  17.                             break;
  18.                 }
  19.             }
  20.         }
  21.     }
  22.     class Program
  23.     {
  24.         static void Main(string[] args)
  25.         {
  26.             string fName = Convert.ToString(Console.ReadLine());
  27.             string lName = Convert.ToString(Console.ReadLine());
  28.             int _Age = Convert.ToInt32(Console.ReadLine());
  29.             Double _Heigth = Convert.ToDouble(Console.ReadLine());
  30.             string _sex = Convert.ToString(Console.ReadLine());
  31.             neighbor Neighbor = new neighbor()
  32.             {
  33.                 FirstName = fName;
  34.                
  35.                
  36.             }
  37.         }
  38.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement