C# copy string except for last letter
using System;
class Program
{
static void Main()
{
string input = "OneTwoThree";
string sub = input.Substring(0, input.Length - 5);
Console.WriteLine("Substring: {0}", sub);
}
}
Output
Substring: OneTwo
Also in C#:
- nullreferenceexception c#
- unity up arrow input
- sort c#
- visual studio c# mark class deprecated
- how to route back to url using Request.Headers["Referer"].ToString() in asp.net core
- Unity3d GPS code
- MVC creating a counter for products
- string format c#
- loop gridcontrol devexpress c#
- c# contextswitchdeadlock
- convert string to boolean c#
- c# inheritance constructor
- unity rotate object relative to camera
- c# string to lowercase
- covert char[] to string C#
- mysql C# select pk and all columns datareader
- transform object according to its parent unity
- c# copy file
- c# how to use inovke
- c# thread sleep
- c# get every point in a line in matrix
- list of vectors c#
- asp.net core redirecttoaction with parameters
- .net core copy file in folder to root