how do you declare a char* in .net?
+6
A:
You don't. That's what System.String is for. If you need to interop with native DLL's, see this.
Alex
2010-04-25 13:18:44
It depends what it's being used for. `byte[]` may be closer.
Matthew Flaschen
2010-04-25 13:19:26
oh i guess that why its called managed .net.
n00b8688
2010-04-25 13:21:36
+3
A:
What exactly are you trying to do?
Didn't saw your comment. I guess we posted at the same time. String, being a reference type, will be stored in heap (the value). While the location where the string value is should be on stack. Although I am not too sure since string does not behaves as a 100% reference type.
You can create pointers in .Net through unsafe code. Although one should do that with utmost care or else can end up with weird and unexpected errors.
danish
2010-04-25 13:26:45