class Person
{
static int
_runningID = 0;
public int Id { get; } = _runningID++;
public string Name { get; set; }
public void SayHi()
{
Console.WriteLine($"Hi my name is {Name}");
}
static Type
GetMyType()
{
return typeof(Person);
}
}
class Program
{
static void Main(string[] args)
{
var p1 = new Person { Name = "Pawel" };
var p2 = new Person { Name = "Ian" };
p1.SayHi();
p2.SayHi();
Console.WriteLine(Person.GetMyType());
}
}