18 lines
293 B
C#
18 lines
293 B
C#
namespace PersonClass;
|
|
|
|
class Person
|
|
{
|
|
public string Name { get;}
|
|
public int Age { get;}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "Name: " + Name + ", Age: " + Age;
|
|
}
|
|
|
|
public Person(string name, int age)
|
|
{
|
|
Name = name;
|
|
Age = age;
|
|
}
|
|
}
|