Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# right function

    /// <summary>Get substring of specified number of characters on the right.
	/// There is no built-in 'Right' function in C#</summary>
    public static string Right(this string value, int length)
    {
        if (String.IsNullOrEmpty(value)) return string.Empty;
        return value.Length <= length ? value : value.Substring(value.Length - length);
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: linq sum 
Csharp :: how to validate if date is a weekday or weekend c# 
Csharp :: c# create array with n elements 
Csharp :: c# findindex 
Csharp :: c# array max 
Csharp :: unity get gameobject from hit 
Csharp :: c# switch case greater than 
Csharp :: how to stop a form c# 
Csharp :: how to get current dir in c# 
Csharp :: Show private fields in Unity Inspector 
Csharp :: c# get serial ports 
Csharp :: c# loops 
Csharp :: how to minimum text length in textbox in c# 
Csharp :: jenga db connection 
Csharp :: c# xml get root attributes 
Csharp :: unity game object remove parent 
Csharp :: Data at the root level is invalid. Line 1, position 1. 
Csharp :: entity framework core db first 
Csharp :: c# yield keyword 
Csharp :: unity activate gameobject via script 
Csharp :: unity button not working 
Csharp :: c# list item not in another list 
Csharp :: c# dictionary get key by value 
Csharp :: window height in C# forms 
Csharp :: get quaternion from vector unity 
Csharp :: how to convert timestamp to datetime c# 
Csharp :: c# get a value from value tuple list 
Csharp :: convert path to uri c# 
Csharp :: how to access asp button of gridview 
Csharp :: unity c# find object position in array 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =