changing a character in a C# string

Discussion in 'Web Design & Coding' started by Complete, Jul 11, 2011.

  1. Complete

    Complete OSNN Addict

    Messages:
    94
    changing a character in a C# string
    suppose I have created a string in C# and I want to change the last character to a blank.

    private static string sOldMassiveOutput;

    public static string oldmassiveoutput
    {
    get { return sOldMassiveOutput.Trim(); }
    set { sOldMassiveOutput = value; }
    }
    oldmassiveoutput[oldmassiveoutput.Length - 1] = ' ';

    This will not work.
    How do I make it work? ​