Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hai,


I have some doubt regarding textbox.What is the purpose of trim in the textbox.Why we put textbox1.text.trim.I saw the syntax in combobox also.Please clear my doubt.

Thanks in Advance
Posted

1 solution

Trim removes leading and trailing spaces (or characters if specified) from a string.
Ref:http://msdn.microsoft.com/en-us/library/system.string.trim.aspx[^]
 
Share this answer
 
v2
Comments
Kim Togo 27-Jun-11 6:37am    
My 5. And String.Trim has nothing to do with TextBox. Only the String class.
Prerak Patel 27-Jun-11 6:40am    
Definitely. I thought the link would clear OPs doubts.
[no name] 27-Jun-11 6:41am    
my 5 too
CS2011 27-Jun-11 7:05am    
good answer 5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900