Removing last character in a string in C#

This code will be helpful to remove the last character in a string.

using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            string nameFull = "code";

            string LastChar = nameFull.Remove(nameFull.Length - 1, 1);

            Console.WriteLine("Remaining characters :" + LastChar);
                        
        }

    }
}


Output: cod