Skip to content

Instantly share code, notes, and snippets.

@pedroreys
Created July 27, 2011 00:49
Show Gist options
  • Save pedroreys/1108443 to your computer and use it in GitHub Desktop.
Save pedroreys/1108443 to your computer and use it in GitHub Desktop.
Right function in C#
public string Right(string value, int targetLenght)
{
var startIndex = value.Length - targetLenght;
return value.Substring(startIndex, targetLenght);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment