Why not create a small test program that uses both, then look at the IL code that gets created, using a tool like ildasm.exe (comes with the framework) or Reflector (a free download from Lutz Roeder)?
This is an extremely useful technique for answering these sorts of questions.
Chip H.
____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first
Yes that is a great way to get a very clear answer to this type of question. I think reading the documentation prior to jumping into any code writing is the best first step though. I've seen it save far more time over the years of a true understanding on what you are doing. honestly I question about anyone that doesn't read a language or framework or whatever doc's prior to actually writing a program in it. Yeah teh Hello World program is great and everyone does it. but how many people do it after reading per say C#.NET's supporting reference documentation and truely know how the hello program outputs that string to the screen
____________ signature below ______________
General FAQ faq333-2924
5 steps to asking a question faq333-3811
The intrinsic data types in C# are no more than aliases for structures and classes defined in the System namespace. So, string is an alias for System.String and the compiler will resolve it for you as such. If you so choose, feel free to declare your built-in data types using their real name as instances of classes and structures.
string == System.String
int == System.Int32
and so on.
Even better, if you have using System; in your program you can just use the class/structure name without qualifying them with System
using System;
class myTest
{
Public Int32 x = 5;
Public String str=”Hello”;
}
Walid Magd (MCP)
The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.