Uri.UserInfo プロパティとは? わかりやすく解説

Uri.UserInfo プロパティ

指定した URI に関連付けられているユーザー名、パスワードなどのユーザー固有の情報を取得します。

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

解説解説

このプロパティの戻り値の形式は、通常、"userName:password" です。

使用例使用例

Uri インスタンスを作成し、ユーザー情報をコンソールに出力する例を次に示します。

Dim uriAddress As New Uri("http://user:password@www.contoso.com/index.htm
 ")
Console.WriteLine(uriAddress.UserInfo)
Console.WriteLine("Fully Escaped {0}", IIf(uriAddress.UserEscaped,
 "yes", "no")) 'TODO:
 For performance reasons this should be changed to nested IF statements
    
Uri uriAddress = new Uri ("http://user:password@www.contoso.com/index.htm
 ");
Console.WriteLine(uriAddress.UserInfo);
Console.WriteLine("Fully Escaped {0}", uriAddress.UserEscaped ? "yes"
 : "no");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

Uri.UserInfo プロパティのお隣キーワード
検索ランキング

   

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



Uri.UserInfo プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS