Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Created June 14, 2018 06:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save christiannagel/f6e1b8ce2dfc643f7e366c9c7ea659a5 to your computer and use it in GitHub Desktop.
C# 7 version with nullability
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