Click here to Skip to main content
15,885,278 members

Comments by kanha.460 (Top 16 by date)

kanha.460 21-Jul-13 0:05am View    
My question is:
If i can manipulate both the string values then what's the difference between both types of declaration. i.e. string s; and string s=new string (new char[] {'h'});
I can use all the string function by using string s; only then what's the meaning of
string s=new string(new char[] {'h'});
both are same.
I am asking the difference.
kanha.460 21-Jul-13 0:04am View    
My question is:
If i can manipulate both the string values then what's the difference between both types of declaration. i.e. string s; and string s=new string (new char[] {'h'});
I can use all the string function by using string s; only then what's the meaning of
string s=new string(new char[] {'h'});
both are same.
I am asking the difference.
kanha.460 20-Jul-13 13:18pm View    
string s = "hello";
Console.WriteLine(s);
string sa = new string(new char[] {'H'});
Console.WriteLine(sa);
string a=s.Replace('h', 'E');
Console.WriteLine(s);
Console.WriteLine(a);

We can do everything with both the codes. I have tried this code and it works perfectly.
kanha.460 20-Jul-13 13:17pm View    
string s = "hello";
Console.WriteLine(s);
string sa = new string(new char[] {'H'});
Console.WriteLine(sa);
string a=s.Replace('h', 'E');
Console.WriteLine(s);
Console.WriteLine(a);

We can do everything with both the codes. I have tried this code and it works prefectly.
kanha.460 20-Jan-13 13:15pm View    
please send the links



please send the links for more info.