User klasse Gefüllt mit Konstruktor und Id Generation
This commit is contained in:
@@ -8,5 +8,22 @@ namespace Casino
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user