Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get last two characters of string

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

last two characters of string c#

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

c# get last 3 characters of string

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

PREVIOUS NEXT
Code Example
Csharp :: read all lines from txt c# 
Csharp :: C# calculate sum of digits of a number 
Csharp :: c# reflection resize array 
Csharp :: visual studio console clear 
Csharp :: enumerable.range contains 
Csharp :: c# consuming post rest service 
Csharp :: contains c# 
Csharp :: add all elements in a list c# 
Csharp :: c# calculator 
Csharp :: how to pass string value to enum in c# 
Csharp :: doing void when gameobject setactive unity 
Csharp :: linear search c# 
Csharp :: wpf app how to get all elements 
Csharp :: unity random point in sphere 
Csharp :: c# thread 
Csharp :: html beginform 
Csharp :: httpcontext in .net standard 
Csharp :: c# swtich 
Csharp :: C# program that joins List of strings 
Csharp :: c# convert datetime to unix timestamp 
Csharp :: raycasthit unity 
Csharp :: get key value from object c# 
Csharp :: unity3d find y position on navmesh 
Csharp :: top level statements c# 
Csharp :: c# object list attribute to string 
Csharp :: transform.position.x unity 
Csharp :: c# round number up 
Csharp :: datetime month name 
Csharp :: print all complete object in list c# 
Csharp :: rotate gameobject unity 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =