Beispiel #1
0
 static void Main(string[] args)
 {
     person p = new person();
        string text = p.SayHello("josh", "Daniel", "Melanie","jack","\"(im not here go away)\"");
        Console.WriteLine(text);
        Console.ReadKey();
 }
Beispiel #2
0
 static void Main(string[] args)
 {
     string[] names = { "josh", "Daniel", "Melanie", "jack", "\"(im not here go away)\"" };
     List<string> ListNames = new List<string>(names);
     var test = new Dictionary<string,string>();
     test.Add("password", "josh");
        person p = new person();
        string text = p.SayHello(names);
        Console.WriteLine(text);
        Console.ReadKey();
 }
Beispiel #3
0
 static void Main(string[] args)
 {
     ConsoleKeyInfo info;
     Console.TreatControlCAsInput = true;
     person p = new person();
     List<string> namelist = new List<string>() { "jane", "joe", "james", "juliet" };
     namelist.Add("Daniel");
     namelist.Reverse();
     Console.WriteLine(p.SayHello(namelist, 1));
     do
     {
         info = Console.ReadKey();
         Console.WriteLine("  ------- you pressed: {0}, modifiers pressed: {1}", info.Key.ToString(), info.Modifiers);
     } while (info.Key != ConsoleKey.Escape);
 }
Beispiel #4
0
 public void SayHello(person personal)
 {
     Console.WriteLine("hello, {0} {1}", personal.FirstName, personal.LastName);
 }