Answers for "c# how to last deteminate char in string"

C#
38

c# remove last character from string

string Name = "Teste,"
string ReturnName = "";
ReturnName = Name.Remove(Name.Length - 1);
Posted by: Guest on June-19-2020
1

c# last char in string

string msg = "Hello";
string last_char = msg[^1..];
Console.WriteLine(last_char); // output:  o
Posted by: Guest on July-12-2021

Code answers related to "c# how to last deteminate char in string"

C# Answers by Framework

Browse Popular Code Answers by Language