using System;
class Pet
{
private string name;
private string type;
private int age;
public string Name
get{return name;}
set
if(!string.IsNullOrWhiteSpace(value))
name=value;
else
name="Неизвестен";
}
public string Type
get{return type;}
if(value=="куче" || value =="котка" || value == "птица")
type= value;
type="Неопределен";
public int Age
get{return age;}
if(value>=0)
age=value;
age=0;
public void PrintInfo()
Console.WriteLine("Име:{0},Вид:{1},Възраст:{2},Name,Type,Age");
public class Program
public static void Main()
Pet myPet=new Pet();
myPet.Name="Боби";
myPet.Type="куче";
myPet.Age=5;
myPet.PrintInfo();