User klasse Gefüllt mit Konstruktor und Id Generation

This commit is contained in:
NBTEMP\bib
2026-08-19 13:45:24 +02:00
parent ba714a26eb
commit 1220484e31
+17
View File
@@ -8,5 +8,22 @@ namespace Casino
{ {
class User class User
{ {
public string ID { get; }
public string Name { get; set; }
public int Alter { get; set; }
public int Geld { get; set; }
public User(string n, int a)
{
ID = ID_Generation();
Name = n;
Alter = a;
Geld = 1000;
}
private string ID_Generation()
{
Guid guid = Guid.NewGuid();
return guid.ToString();
}
} }
} }