Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# string right extension

public static partial class Extensions
{
    /// <summary>
    ///     A string extension method that return the right part of the string.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <param name="length">The length.</param>
    /// <returns>The right part.</returns>
    public static string Right(this string @this, int length)
    {
        return @this.Substring(@this.Length - length);
    }
}
 
PREVIOUS NEXT
Tagged: #string #extension
ADD COMMENT
Topic
Name
7+8 =