C#
[C#] BCL Encoding 타 언어 프로그램과 데이터 주고 받기
Jcoder
2020. 11. 29. 14:04
static void Main(string[] args)
{
Console.WriteLine("System.Text.Encoding");
string textData = "Hello World";
byte[] buf = System.Text.Encoding.UTF8.GetBytes(textData);
//
// buf 바이트 배열을 타 언어 프로그램으로 전달.
//
byte[] receivedbuf = ... // 타 언어 프로그램으로부터 전달받은 바이트 배열 데이터
string receivedText = System.Text.Encoding.UTF8.GetString(receivedbuf);
}