I was reading More Joel on Software when I came across Joel Spolsky saying something about a particular type of programmer knowing the difference between an i
This has already been answered for Java, here's the C# answer:
"Integer" is not a valid type name in C# and "int" is just an alias for System.Int32. Also, unlike in Java (or C++) there aren't any special primitive types in C#, every instance of a type in C# (including int) is an object. Here's some demonstrative code:
void DoStuff()
{
System.Console.WriteLine( SomeMethod((int)5) );
System.Console.WriteLine( GetTypeName() );
}
string SomeMethod(object someParameter)
{
return string.Format("Some text {0}", someParameter.ToString());
}
string GetTypeName()
{
return (typeof (T)).FullName;
}