Created
June 14, 2018 06:24
-
-
Save christiannagel/f6e1b8ce2dfc643f7e366c9c7ea659a5 to your computer and use it in GitHub Desktop.
C# 7 version with nullability
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
public class Legacy | |
{ | |
public string GetANullString() => null; | |
public string PassAString(string s) | |
{ | |
if (s == null) throw new ArgumentNullException(nameof(s)); | |
return s.ToUpper(); | |
} | |
} | |
public interface ILegacyInterface | |
{ | |
string Foo(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment