c# get last character of string
string str = "Hello World";
string substr = str.Substring(str.Length - 1);
c# get last character of string
string str = "Hello World";
string substr = str.Substring(str.Length - 1);
c# get last 3 characters of string
var result = input.Substring(input.Length - 3);
get last character of string c#
str = str.Substring(str.Length - 1);
c# last char in string
string msg = "Hello";
string last_char = msg[^1..];
Console.WriteLine(last_char); // output: o
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us