sstrings
hi to all
can you give a full description about string class and what are the methods string class have.
what is the difference between string and string builder
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Dec 3, 2009, 10:19 AM
Refer to this great article . Every String Operation is Explained with proper example
http://www.dotnetspider.com/resources/20179-String-Operations-C.aspx
theLizardPosted Dec 3, 2009, 4:44 PM
Press F1 for help...
Lalit MPosted Dec 3, 2009, 7:43 AM
Stringclass represents textual data, i.e., a series of Unicode characters; but, aStringobject is actually a sequential collection ofSystem.Charobjects. The value of thecharis the content of the collection; and, the value is immutable.String Methods in C#.
ToLower: converts the instance to lower case
ToUpper: converts the instance to upper case
Substring: extracts a portion of the instance based on begin and end points
IndexOf: calculates the position of a specified character in the instance
Remove: deletes a portion of the instance based on begin and end points
StartsWith: determines whether the beginning of the instance matches a specified string
Replace: replaces a portion of the instance with a specified string
Below is the C# code demonstrating the String Methods. If you right-click and Open in New Window, the code is more readable.
There is an abundant amount of string methods in the C# language. This post just barely skims the surface.
More about String ClassUse of String Method
More examples string method
String vs StringBuilder