how to use trim string in c# code example Example: c# trim string string hello = " hello world "; hello.Trim();