Skip to content

Instantly share code, notes, and snippets.

@rohinomiya
Created November 17, 2012 17:04
Show Gist options
  • Save rohinomiya/4097694 to your computer and use it in GitHub Desktop.
Save rohinomiya/4097694 to your computer and use it in GitHub Desktop.
C#で、文字コードを表す文字列から、文字に変換する ref: http://qiita.com/items/ca30f311f881cbb33ca8
string charCode = "304C";
int charCode16 = Convert.ToInt32(charCode,16); // 16進数文字列 -> 数値
char c = Convert.ToChar(charCode16); // 数値(文字コード) -> 文字
string newChar = c.ToString(); // "が" という「文字列」
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment