// CharIsLetterOrDigit.cpp : メイン プロジェクト ファイルです。 #include "stdafx.h" using namespace System; int main(array ^args) { // 文字がアルファベット文字または 10 進数の数字かどうか判断する if (System::Char::IsLetterOrDigit(L'J')) { Console::WriteLine("アルファベット文字または 10 進数の数字です。"); } else { Console::WriteLine("アルファベット文字または 10 進数の数字ではありません。"); } // String 型の場合は検査する文字の位置を指定する if (System::Char::IsLetterOrDigit("12C456", 2)) { Console::WriteLine("アルファベット文字または 10 進数の数字です。"); } else { Console::WriteLine("アルファベット文字または 10 進数の数字ではありません。"); } return 0; }