Skip to content

Instantly share code, notes, and snippets.

@MarcBruins
Created December 16, 2018 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcBruins/cd7643d13f8a0c1bdb7f3587673938cd to your computer and use it in GitHub Desktop.
Save MarcBruins/cd7643d13f8a0c1bdb7f3587673938cd to your computer and use it in GitHub Desktop.
Returning null for null Uri
public static Uri EnsureTrailingSlash(Uri uri)
{
if (uri == null)
return null;
return new Uri(uri.ToString() + "/");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment