Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get last character of string

string str = "Hello World";
string substr = str.Substring(str.Length - 1);
Comment

get last 4 character c#

string mystring = "Hellopeople";
string lastFour =  mystring.Substring(mystring.Length - 4 , 4);

Console.WriteLine(lastFour);
Comment

get last character of string c#

str = str.Substring(str.Length - 1);
Comment

c# get last 3 characters of string

var result = input.Substring(input.Length - 3);
Comment

c# last char in string

string msg = "Hello";
string last_char = msg[^1..];
Console.WriteLine(last_char); // output:  o
Comment

c# get last character of string

mystring.Substring(mystring.Length - 4);
Comment

PREVIOUS NEXT
Code Example
Csharp :: check shell command success 
Csharp :: inline creation dictionnary C# 
Csharp :: set parent of gameobject unity 
Csharp :: add all elements in a list c# 
Csharp :: how to store an array inside an array c# 
Csharp :: 2 rotation unity 
Csharp :: unity c# random number 
Csharp :: c# dictionary add 
Csharp :: how return only value of array in laravel 
Csharp :: Net.ServicePointManager.SecurityProtocol .net framework 4 
Csharp :: wpf mouse over style trigger 
Csharp :: unity random point in sphere 
Csharp :: c# set datetime to null value 
Csharp :: regex c# 
Csharp :: instantiate unity 2d in parent 
Csharp :: unity audio manager 
Csharp :: c# int array 
Csharp :: public gameobject unity 
Csharp :: Unity Interstitial ad C# 
Csharp :: Convert DataTable to Dictionary in C# 
Csharp :: asp.net core mvc jsonresult example 
Csharp :: how to know character is a digit or not in c# 
Csharp :: get color of pixel c# 
Csharp :: c# sort for loop 
Csharp :: else if c# 
Csharp :: c# array of class 
Csharp :: c# check if char is string 
Csharp :: C# setting property values through reflection with attributes 
Csharp :: c# datetime blank 
Csharp :: if set active == false unity 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =