SHARE
TWEET

Untitled

lekss361 Oct 17th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace HW5._1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Player Newplayer = new Player("Aleks",30,"Муж");
  10.             Newplayer.PlayerInfo();
  11.             Console.ReadKey();
  12.         }
  13.     }
  14.  
  15.     class Player
  16.     {
  17.         public int Age;
  18.         public string NamePlayer;
  19.         public string Gender;
  20.  
  21.         public void PlayerInfo()
  22.         {
  23.             Console.WriteLine($"Ваше имя: {NamePlayer}\nВаш возраст: {Age}\nВаш пол: {Gender}");
  24.         }
  25.  
  26.         public Player(string namePlayer,int age,string gender)// 0-m 1-w
  27.         {
  28.             NamePlayer = namePlayer;
  29.             Age = age;
  30.             Gender = gender;
  31.         }
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top