Uri.FromHex メソッドとは? わかりやすく解説

Uri.FromHex メソッド

16 進数数字対応する 10 進数値を返します

名前空間: System
アセンブリ: System (system.dll 内)
構文構文

例外例外
例外種類条件

ArgumentException

digit有効な 16 進数数字 (0 ~ 9、a ~ f、A ~ F) ではありません。

解説解説

FromHex メソッドは、16 進数数字を表す文字 (0 ~ 9、a ~ f、A ~ F) を 10 進数値 (0 ~ 15) に変換しますdigit有効な 16 進数数字ない場合は、例外 ArgumentExceptionスローさます。

使用例使用例

文字16 進文字かどうか判断し16 進文字である場合対応する 10 進値をコンソール出力する例を次に示します

Dim testChar As Char = "e"c
If Uri.IsHexDigit(testChar) = True Then
    Console.WriteLine("'{0}' is the hexadecimal representation
 of {1}", testChar, Uri.FromHex(testChar))
Else
    Console.WriteLine("'{0}' is not a hexadecimal character",
 testChar)
End If 
Dim returnString As String
 = Uri.HexEscape(testChar)
Console.WriteLine("The hexadecimal value of '{0}'
 is {1}", testChar, returnString)
char  testChar = 'e';
if (Uri.IsHexDigit(testChar) == true)
    Console.WriteLine("'{0}' is the hexadecimal representation of {1}",
 testChar, Uri.FromHex(testChar));
else 
    Console.WriteLine("'{0}' is not a hexadecimal character", testChar);

string returnString = Uri.HexEscape(testChar);
Console.WriteLine("The hexadecimal value of '{0}' is {1}", testChar, returnString);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からUri.FromHex メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からUri.FromHex メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からUri.FromHex メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Uri.FromHex メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Uri.FromHex メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS