Hi all I am new here. I have been using C# in ASP.NET apps for about a year.
I am wondering though, what is the difference between using String and string in declaring a variable. I have seen them both used and VS uses different color schemes for each. Are they 100% interchangeable?
Loading
Kirtan PatelPosted Aug 17, 2009, 11:35 PM
like below table all data type int ,string are just alias
string
System.String
billPosted Aug 17, 2009, 11:20 PM
So I guess to further clarify my question about declaring a variable...
are both of these uses acceptable? Any pros or cons?
protected void someFunction()
{
String strName = "Mahesh";
// do something
}
protected void someFunction()
{
string strName = "Mahesh";
// do something
}
Mahesh ChandPosted Aug 17, 2009, 11:03 PM