Tuesday, 29 January 2013

String in C Sharp

By on 22:23

String Manipulation in C#:-String is also called as array of character.Each string is terminated by null character represented by '/0'.String is the predefined data type in C#.We write object as 'System.String'

Some String Methods/Properties:-


string st1;

2)Copy 2 strings:-

string st1=st2;
string st2=String.Copy(st1);

3)Concatenate 2 string:-

string st3=st1+st2;
string st3=String.Concat(st1,st2);

4)Compare two string:-

int number=String.Compare(st1,st2);

5)Join():-Join method is used to join two strings.

6)Remove():-Remove function is used to delete character from string.

7)Equals():-Is used to check the equality of 2 string.

8)Insert():-Insert is used to insert a  string at a specified location.

9)ToLower():-Is used to "Returns lower case of the string".

10)ToUpper():-Is used to "Returns Upper case of the string".

If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.


Post a Comment

Related Posts Plugin for WordPress, Blogger...