UriBuilder コンストラクタ ()とは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > UriBuilder コンストラクタ ()の意味・解説 

UriBuilder コンストラクタ ()


UriBuilder コンストラクタ (String, String, Int32, String, String)

指定したスキームホストポート番号パス、およびクエリ文字列またはフラグメント識別子使用して、UriBuilder クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentException

extraValue が、null 参照 (Visual Basic では Nothing)、Emptyシャープ記号 (#) で始まる有効なフラグメント識別子疑問符 (?) で始まる有効なクエリ文字列のいずれでもありません。

ArgumentOutOfRangeException

port が 0 未満です。

解説解説

UriBuilder インスタンスは、Scheme プロパティschemeName に、Host プロパティhostName に、Port プロパティportNumber に、および Path プロパティpathValueそれぞれ設定して初期化されますextraValueシャープ記号 (#) で始まる場合には、FragmentextraValue設定されます。extraValue疑問符 (?) で始まる場合には、QueryextraValue設定されます。

使用例使用例

http://www.contoso.com:8080/index.htm#top という URI を含む UriBuilder インスタンス作成する例を次に示します

Dim myUri As New UriBuilder("http",
 "www.contoso.com", 8080, "index.htm",
 "#top")

UriBuilder myUri = new UriBuilder("http","www.contoso.com"
,8080,"index.htm","#top");

UriBuilder^ myUri = gcnew UriBuilder( "http","www.contoso.com",8080,"index.htm","#top"
 );
UriBuilder myUri = new UriBuilder("http", "www.contoso.com"
,
    8080, "index.htm", "#top");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

UriBuilder コンストラクタ (Uri)

指定した Uri インスタンス使用して、UriBuilder クラス新しインスタンス初期化します。

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

例外例外
解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

UriBuilder コンストラクタ (String, String, Int32, String)

指定したスキームホストポート番号、およびパス使用して、UriBuilder クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentOutOfRangeException

port が 0 未満です。

解説解説

UriBuilder インスタンスは、Scheme プロパティschemeName に、Host プロパティhostName に、Port プロパティportNumber に、および Path プロパティpathValueそれぞれ設定して初期化されます

使用例使用例

http://www.contoso.com:8080/index.htm という URI を含む UriBuilder インスタンス作成する例を次に示します

Dim myUri As New UriBuilder("http",
 "www.contoso.com", 8080, "index.htm")

UriBuilder myUri = new UriBuilder("http","www.contoso.com"
,8080,"index.htm");

UriBuilder^ myUri = gcnew UriBuilder( "http","www.contoso.com",8080,"index.htm"
 );
UriBuilder myUri =
    new UriBuilder("http", "www.contoso.com",8080,
 "index.htm");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

UriBuilder コンストラクタ


UriBuilder コンストラクタ (String, String)

指定したスキームホスト使用して、UriBuilder クラス新しインスタンス初期化します。

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

Public Sub New ( _
    schemeName As String, _
    hostName As String _
)
Dim schemeName As String
Dim hostName As String

Dim instance As New UriBuilder(schemeName,
 hostName)
public UriBuilder (
    string schemeName,
    string hostName
)
public:
UriBuilder (
    String^ schemeName, 
    String^ hostName
)
public UriBuilder (
    String schemeName, 
    String hostName
)
public function UriBuilder (
    schemeName : String, 
    hostName : String
)

パラメータ

schemeName

インターネット アクセス プロトコル

hostName

DNS スタイルドメイン名、または IP アドレス

解説解説
使用例使用例

http://www.contoso.com/ という URI を含む UriBuilder インスタンス作成する例を次に示します

Dim myUri As New UriBuilder("http",
 "www.contoso.com")

UriBuilder myUri = new UriBuilder("http","www.contoso.com");

UriBuilder^ myUri = gcnew UriBuilder(  "http", "www.contoso.com"
 );
UriBuilder myUri = new UriBuilder("http", "www.contoso.com");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

UriBuilder コンストラクタ (String)

指定した URI使用して、UriBuilder クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentNullException

urinull 参照 (Visual Basic では Nothing) です。

UriFormatException

uri長さが 0 か、空白しか含まれていません。

または

解析ルーチン無効な形式スキーム検出しました

または

パーサーが、"file" スキーム使用しない URI3 つ上の連続するスラッシュ検出しました

または

uri有効な URI ではありません。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

UriBuilder コンストラクタ (String, String, Int32)

指定したスキームホスト、およびポート使用して、UriBuilder クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentOutOfRangeException

portNumber が 0 未満です。

解説解説
使用例使用例

http://www.contoso.com:8080/ という URI を含む UriBuilder インスタンス作成する例を次に示します

Dim myUri As New UriBuilder("http",
 "www.contoso.com", 8080)

UriBuilder myUri = new UriBuilder("http","www.contoso.com"
,8080);

UriBuilder^ myUri = gcnew UriBuilder( "http", "www.contoso.com",8080
 );
UriBuilder myUri = new UriBuilder("http", "www.contoso.com",
 8080);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「UriBuilder コンストラクタ ()」の関連用語

UriBuilder コンストラクタ ()のお隣キーワード
検索ランキング

   

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



UriBuilder コンストラクタ ()のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS