Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get last character of string

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

c# get last two characters of string

// str = "Hello world";
var result = str.Substring(str.Length - 2);
// result = "ld"
Comment

get last 4 character c#

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

Console.WriteLine(lastFour);
Comment

last two characters of string c#

string str = "Hello World";
string substr = str.Substring(str.Length - 2);
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# get last character of string

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

PREVIOUS NEXT
Code Example
Csharp :: move file c# 
Csharp :: get host ip address asp.net core 
Csharp :: move towards target unity 
Csharp :: list add at index c# 
Csharp :: mailkit send attachment 
Csharp :: c# counting lines 
Csharp :: c# run as administrator 
Csharp :: keyboard input unity 
Csharp :: subtract two times c# 
Csharp :: how to get executable path in wpf 
Csharp :: c# generate random int in range 
Csharp :: contains with ignore case c# 
Csharp :: Unity Scene Load by Name 
Csharp :: c# system.drawing.color to system.windows.media.color 
Csharp :: add dynamically buttons in loop with events winform c# 
Csharp :: c# print array 
Csharp :: unity invisible cube 
Csharp :: unity c# addition class 
Csharp :: listview disable resize columns 
Csharp :: how to get the color of other label when clicking c# 
Csharp :: shorthand in c# operator 
Csharp :: how to convert a number to 2 decimal places in c# 
Csharp :: remove element from sting array c# 
Csharp :: Create gaps / headers between variables in the unity inspector 
Csharp :: unity get rigidbody 
Csharp :: c# rename file add 
Csharp :: convert string to array c# 
Csharp :: readonly vs const c# 
Csharp :: c# check if array is empty 
Csharp :: c# unity follow object 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =