Horje
c# get last character of string Code Example
c# get last character of string
string str = "Hello World";
string substr = str.Substring(str.Length - 1);
c# get last two characters of string
var result = str.Substring(str.Length - 2);
c# last char in string
string msg = "Hello";
string last_char = msg[^1..];
Console.WriteLine(last_char); // output:  o
last two characters of string c#
string str = "Hello World";
string substr = str.Substring(str.Length - 2);
get last character of string c#
str = str.Substring(str.Length - 1);
c# get last character of string
mystring.Substring(mystring.Length - 4);




Csharp

Related
c# remove last value from list Code Example c# remove last value from list Code Example
how to do cmd command c# Code Example how to do cmd command c# Code Example
how to set the fps in monogame Code Example how to set the fps in monogame Code Example
unity set position Code Example unity set position Code Example
check last character of a string c# Code Example check last character of a string c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11