Advertisement
alexbancheva

Rabbit_class Rabbit

Jun 18th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Rabbits
  6. {
  7.    public class Rabbit
  8.    {
  9.         private Rabbit()
  10.         {
  11.             this.Available = true;
  12.         }
  13.         public Rabbit(string name, string species)
  14.             : this()
  15.         {
  16.             this.Name = name;
  17.             this.Species = species;
  18.         }
  19.         public string Name { get; set; }
  20.  
  21.         public string Species { get; set; }
  22.  
  23.         public bool Available { get; set; }
  24.  
  25.         public override string ToString()
  26.         {
  27.             return $"Rabbit ({this.Species}): {this.Name}";
  28.         }
  29.    }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement