hi all,
i know this is really simple. but i still get it wrong. i try to do this:
int intLen = 100;
string StrLen;
StrLen = intLen;
MessageBox StrLen;
i got error. Y?
longwar
Printable View
hi all,
i know this is really simple. but i still get it wrong. i try to do this:
int intLen = 100;
string StrLen;
StrLen = intLen;
MessageBox StrLen;
i got error. Y?
longwar
Every object has a ToString method:Code:myString = anyObject.ToString();
ic ... i got it. tot it is the same as in VB
It's exactly the same as VB. Same framework. Just different syntax.
If your problem is fixed please go to Thread Tools (above the first post) and click Mark Thread Resolved. Thanks :)
When you're dealing with types from the .NET Framework it's always going to be essentially the same regardless of language. The only difference is the syntax of the langauge, like in C# you need the semicolon obviously, and in C# if you're indexing a property you use square brackets instead of parentheses. Just little stuff like that. all the types and members are exactly the same though.
Won't using ToString on an Integer just return its memory address?
Why don't you try it and see.
Why would converting anything to a string return a memory address? C# doesn't expose memory addresses at all except through unsafe code, and then it is with pointers. The whole point of reference types is to hide memory addresses and pointers from the developer.
Ah, thanks for the infoQuote:
Originally Posted by jmcilhinney