Today i got a question that what is difference between string vs System.String . suddenly i was not able to recall it. i went to my laptop and tried with a program and find out the both are same. string is alias for System.String.
Same there is number of alias C# provide. you can go to msdn and check it.
using System;
namespace MyApp
{
class my_class
{
static void Main(string[] args)
{
System.String str1 = "abc";
string str2 = "abc";
Console.WriteLine(str1);
Console.WriteLine(str2);
Console.ReadLine();
}
}
}
No comments:
Post a Comment