jenglish

jenglish

  • NA
  • 8
  • 0

getting an ASCII char string from C# String

Nov 12 2003 4:27 PM
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.

Answers (2)