Beispiel #1
0
 static void Main(string[] args)
 {
     Animal animal = new Animal();
     //animal.Type = "Mammal";
     Console.WriteLine("Animal Type: {0}", DoubleQuestionMark(animal));
     Console.ReadLine();
 }
Beispiel #2
0
 public static string DoubleQuestionMark(Animal a)
 {
     Animal temp = new Animal() { Type = "Reptile" };
     return (a.Type) ?? temp.Type;
 }