Getting an ASCII char string from C# String
Does anyone now how to pass a C# char to unmanaged C char?
The big difference is the C char is an 8 bit char and a C# is 16 bit. I can use the encode method but that creates a byte[]. I can't figure this out.
I have an unmanaged C function that I need to pass a string to, but the C function is a zero terminated ascii string. I cannot find anything in C# to help me cast.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

jamesRank #1,153 · 1.6K reputationPosted Nov 12, 2003, 12:35 PM EST
jenglish14 reputationPosted Nov 12, 2003, 12:46 PM EST