correction
This commit is contained in:
@@ -10,5 +10,37 @@ class Program()
|
||||
var game = PierrePapierCiseauxGameFactory.CreateGame(consoleService);
|
||||
var runner = new GameRunnerConsole(consoleService, game);
|
||||
runner.Run();
|
||||
}
|
||||
|
||||
var personne = new Personne("toto");
|
||||
personne.ShowName();
|
||||
}
|
||||
}
|
||||
|
||||
public class Personne
|
||||
{
|
||||
|
||||
public Personne(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
public string GetFirstLetter()
|
||||
{
|
||||
return Name.FirstOrDefault().ToString();
|
||||
}
|
||||
|
||||
public void ShowName()
|
||||
{
|
||||
Console.WriteLine("Votre nom est: " + Plop());
|
||||
}
|
||||
|
||||
|
||||
private string Plop()
|
||||
{
|
||||
return Name[0].ToString().ToUpper() + Name[1..];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user