how to trim a string with C# code example Example: c# trim string string hello = " hello world "; hello.Trim();