How to remove white spaces or empty spaces from within String?

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

We use Following method to remove white spaces or empty spaces from within String.

1). Trim():- It removes both leading and trailing spaces from string.

2). TrimStart():- It removes only leading space from string.

3). TrimEnd():- It removes only trailing space from string.

Actually these are static method provided by Dot Net.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response