RickyWh
public text v1 · immutableusing System;
using System.Collections;
namespace RickyTest
{
public class Cat
{
public string name;
private int age;
public int Age
{
get
{
return this.age;
}
set
{
this.age = value;
}
}
public Cat(string name, int age)
{
this.name = name;
this.Age = age;
Console.WriteLine("{0} and {1}", this.name, this.age);
}
}
public class MainApplication
{
static void Main()
{
Cat ricky = new Cat("Fat face cat", 27);
}
}
}