How to remove leading space from below string?

string name = " Rajesh";

 Posted by Rajesh_Kumar on 1/22/2014 | Category: C# Interview questions | Views: 690 | Points: 40
Answer:

We will use TrimStart() method to remove spaces from above string.

string name = " Rajesh";
name = name.TrimStart();


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response