Created
May 28, 2014 11:15
-
-
Save nikmd23/6440e12f800580b2c8ff to your computer and use it in GitHub Desktop.
.NET Fiddle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person | |
{ | |
public Person(string name = "Joe Somebody") | |
{ | |
Name = name; | |
} | |
public string Name { get; private set; } | |
public string Greet() | |
{ | |
if (Name == null) | |
return "Hello, stranger!"; | |
return string.Format("Hello, {0}!", Name); | |
} | |
} | |
Console.WriteLine(new Person().Greet()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment