I have a StringBuilder variable that I would like to pin and enumerate using a char*.
I know that when using a P/Invoke to unmanaged code you can use StringBuilder in place of the unmanaged char*. So it should be possible to use a char* in place of StringBuilder in managed code right?
However, it doesn't work like a string, I can't use a StringBuilder like this:
string str = "some text here";
fixed (char* c = str)
So is there some way I can get a StringBuilder as a char*?
View Complete Post