Below is the example which shows the use of itString strManipulation="My nick name is jk";string strclone;strclone= strManipulation.Clone().ToString();strManipulation += "sdgfsdgsDG";strclone += " test";MessageBox.Show(strclone + " " + strManipulation);
ExampleFor Trim()string strtrim = " My nick name is jk ";MessageBox.Show("-" + strtrim + "-");strtrim = Trimfunction(strtrim);strtrim.Trim();MessageBox.Show("-" + strtrim + "-");For TrimStart()string strtrimstart = " My nick name is jk ";MessageBox.Show("-" + strtrimstart + "-");strtrim.TrimStart();MessageBox.Show("-" + strtrimstart + "-");For Trimend()string strtrimend = " My nick name is jk ";MessageBox.Show("-" + strtrimend + "-");strtrim.Trimend();MessageBox.Show("-" + strtrimend + "-");