Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace CSLight
- {
- public class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player("Родион", 25, 80);
- player.OutputInformation();
- }
- }
- class Player
- {
- public string Name;
- public int Age;
- public float Weight;
- public Player(string name, int age, float weight)
- {
- Name = name;
- Age = age;
- Weight = weight;
- }
- public Player()
- {
- Name = "none";
- Age = 0;
- Weight = 0;
- }
- public void OutputInformation()
- {
- Console.WriteLine($"Имя:{Name}\nВозраст:{Age}\nВес:{Weight}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement