NameValueCollection コンストラクター

定義

NameValueCollection クラスの新しいインスタンスを初期化します。

オーバーロード

NameValueCollection()

空で、既定の初期量を備え、大文字と小文字を区別しない既定のハッシュ コード プロバイダーと大文字と小文字を区別しない既定の比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

NameValueCollection(IEqualityComparer)

空で、既定の初期量を備え、指定した NameValueCollection オブジェクトを使用する、IEqualityComparer クラスの新しいインスタンスを初期化します。

NameValueCollection(NameValueCollection)

コピーされるエントリの数と同じ初期量を備え、ソース コレクションと同じハッシュ コード プロバイダーおよび比較子を使用する新しい NameValueCollection に、指定した NameValueCollection からエントリをコピーします。

NameValueCollection(Int32)

空で、指定した初期量を備え、大文字と小文字を区別しない既定のハッシュ コード プロバイダーと大文字と小文字を区別しない既定の比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

NameValueCollection(IHashCodeProvider, IComparer)
古い.
古い.

空で、既定の初期量を備え、指定したハッシュ コード プロバイダーと指定した比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

NameValueCollection(Int32, IEqualityComparer)

空で、指定した初期量を備え、指定した IEqualityComparer オブジェクトを使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

NameValueCollection(Int32, NameValueCollection)

指定した初期量またはコピーされるエントリの数と同じ初期量のうち値が大きい方の初期量を備え、大文字と小文字を区別しない既定のハッシュ コード プロバイダーおよび大文字と小文字を区別しない既定の比較子を使用する新しい NameValueCollection に、指定した NameValueCollection からエントリをコピーします。

NameValueCollection(SerializationInfo, StreamingContext)
古い.

シリアル化でき、指定した SerializationInfoStreamingContext を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

NameValueCollection(Int32, IHashCodeProvider, IComparer)
古い.
古い.

空で、指定した初期量を備え、指定したハッシュ コード プロバイダーと指定した比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

NameValueCollection()

空で、既定の初期量を備え、大文字と小文字を区別しない既定のハッシュ コード プロバイダーと大文字と小文字を区別しない既定の比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

public:
 NameValueCollection();
public NameValueCollection ();
Public Sub New ()

注釈

NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 既定のハッシュ コード プロバイダーは、CaseInsensitiveHashCodeProviderです。

比較演算子は、2 つのキーが等しいかどうかを判断します。 既定の比較子は です CaseInsensitiveComparer

このコンストラクターは O(1) 操作です。

こちらもご覧ください

適用対象

NameValueCollection(IEqualityComparer)

空で、既定の初期量を備え、指定した NameValueCollection オブジェクトを使用する、IEqualityComparer クラスの新しいインスタンスを初期化します。

public:
 NameValueCollection(System::Collections::IEqualityComparer ^ equalityComparer);
public NameValueCollection (System.Collections.IEqualityComparer equalityComparer);
public NameValueCollection (System.Collections.IEqualityComparer? equalityComparer);
new System.Collections.Specialized.NameValueCollection : System.Collections.IEqualityComparer -> System.Collections.Specialized.NameValueCollection
Public Sub New (equalityComparer As IEqualityComparer)

パラメーター

equalityComparer
IEqualityComparer

2 つのキーが等しいかどうかを判断し、コレクション内のキーのハッシュ コードを生成するために使用する IEqualityComparer オブジェクト。

注釈

オブジェクトの NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

オブジェクトは IEqualityComparer 、比較子とハッシュ コード プロバイダーを結合します。 ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 比較演算子は、2 つのキーが等しいかどうかを判断します。

このコンストラクターは O(1) 操作です。

こちらもご覧ください

適用対象

NameValueCollection(NameValueCollection)

コピーされるエントリの数と同じ初期量を備え、ソース コレクションと同じハッシュ コード プロバイダーおよび比較子を使用する新しい NameValueCollection に、指定した NameValueCollection からエントリをコピーします。

public:
 NameValueCollection(System::Collections::Specialized::NameValueCollection ^ col);
public NameValueCollection (System.Collections.Specialized.NameValueCollection col);
new System.Collections.Specialized.NameValueCollection : System.Collections.Specialized.NameValueCollection -> System.Collections.Specialized.NameValueCollection
Public Sub New (col As NameValueCollection)

パラメーター

col
NameValueCollection

新しい NameValueCollection インスタンスにコピーする NameValueCollection

例外

colnullです。

注釈

NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 既定のハッシュ コード プロバイダーは、CaseInsensitiveHashCodeProviderです。

比較演算子は、2 つのキーが等しいかどうかを判断します。 既定の比較子は です CaseInsensitiveComparer

新しい NameValueCollection の要素は、ソース NameValueCollectionと同じ順序で並べ替えられます。

このコンストラクターは O(n) 操作です。ここで n 、 は 内 colの要素の数です。

こちらもご覧ください

適用対象

NameValueCollection(Int32)

空で、指定した初期量を備え、大文字と小文字を区別しない既定のハッシュ コード プロバイダーと大文字と小文字を区別しない既定の比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

public:
 NameValueCollection(int capacity);
public NameValueCollection (int capacity);
new System.Collections.Specialized.NameValueCollection : int -> System.Collections.Specialized.NameValueCollection
Public Sub New (capacity As Integer)

パラメーター

capacity
Int32

NameValueCollection に格納できるエントリ数の初期値。

例外

capacity が 0 未満です。

注釈

NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 既定のハッシュ コード プロバイダーは、CaseInsensitiveHashCodeProviderです。

比較演算子は、2 つのキーが等しいかどうかを判断します。 既定の比較子は です CaseInsensitiveComparer

このコンストラクターは O(n) 操作です。ここで n 、 は capacityです。

こちらもご覧ください

適用対象

NameValueCollection(IHashCodeProvider, IComparer)

注意事項

Please use NameValueCollection(IEqualityComparer) instead.

注意事項

This constructor has been deprecated. Use NameValueCollection(IEqualityComparer) instead.

空で、既定の初期量を備え、指定したハッシュ コード プロバイダーと指定した比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

public:
 NameValueCollection(System::Collections::IHashCodeProvider ^ hashProvider, System::Collections::IComparer ^ comparer);
[System.Obsolete("Please use NameValueCollection(IEqualityComparer) instead.")]
public NameValueCollection (System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer);
[System.Obsolete("This constructor has been deprecated. Use NameValueCollection(IEqualityComparer) instead.")]
public NameValueCollection (System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer);
[System.Obsolete("Please use NameValueCollection(IEqualityComparer) instead.")]
public NameValueCollection (System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer);
public NameValueCollection (System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer);
[<System.Obsolete("Please use NameValueCollection(IEqualityComparer) instead.")>]
new System.Collections.Specialized.NameValueCollection : System.Collections.IHashCodeProvider * System.Collections.IComparer -> System.Collections.Specialized.NameValueCollection
[<System.Obsolete("This constructor has been deprecated. Use NameValueCollection(IEqualityComparer) instead.")>]
new System.Collections.Specialized.NameValueCollection : System.Collections.IHashCodeProvider * System.Collections.IComparer -> System.Collections.Specialized.NameValueCollection
new System.Collections.Specialized.NameValueCollection : System.Collections.IHashCodeProvider * System.Collections.IComparer -> System.Collections.Specialized.NameValueCollection
Public Sub New (hashProvider As IHashCodeProvider, comparer As IComparer)

パラメーター

hashProvider
IHashCodeProvider

NameValueCollection 内のすべてのキーのハッシュ コードを提供する IHashCodeProvider

comparer
IComparer

2 つのキーが等しいかどうかを判断するために使用する IComparer

属性

注釈

NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 既定のハッシュ コード プロバイダーは、CaseInsensitiveHashCodeProviderです。

比較演算子は、2 つのキーが等しいかどうかを判断します。 既定の比較子は です CaseInsensitiveComparer

このコンストラクターは O(1) 操作です。

こちらもご覧ください

適用対象

NameValueCollection(Int32, IEqualityComparer)

空で、指定した初期量を備え、指定した IEqualityComparer オブジェクトを使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

public:
 NameValueCollection(int capacity, System::Collections::IEqualityComparer ^ equalityComparer);
public NameValueCollection (int capacity, System.Collections.IEqualityComparer equalityComparer);
public NameValueCollection (int capacity, System.Collections.IEqualityComparer? equalityComparer);
new System.Collections.Specialized.NameValueCollection : int * System.Collections.IEqualityComparer -> System.Collections.Specialized.NameValueCollection
Public Sub New (capacity As Integer, equalityComparer As IEqualityComparer)

パラメーター

capacity
Int32

NameValueCollection オブジェクトに格納できるエントリ数の初期値。

equalityComparer
IEqualityComparer

2 つのキーが等しいかどうかを判断し、コレクション内のキーのハッシュ コードを生成するために使用する IEqualityComparer オブジェクト。

例外

capacity が 0 未満です。

注釈

オブジェクトの NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

オブジェクトは IEqualityComparer 、比較子とハッシュ コード プロバイダーを結合します。 ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 比較演算子は、2 つのキーが等しいかどうかを判断します。

このコンストラクターは O(n) 操作です。ここで ncapacity は パラメーターです。

こちらもご覧ください

適用対象

NameValueCollection(Int32, NameValueCollection)

指定した初期量またはコピーされるエントリの数と同じ初期量のうち値が大きい方の初期量を備え、大文字と小文字を区別しない既定のハッシュ コード プロバイダーおよび大文字と小文字を区別しない既定の比較子を使用する新しい NameValueCollection に、指定した NameValueCollection からエントリをコピーします。

public:
 NameValueCollection(int capacity, System::Collections::Specialized::NameValueCollection ^ col);
public NameValueCollection (int capacity, System.Collections.Specialized.NameValueCollection col);
new System.Collections.Specialized.NameValueCollection : int * System.Collections.Specialized.NameValueCollection -> System.Collections.Specialized.NameValueCollection
Public Sub New (capacity As Integer, col As NameValueCollection)

パラメーター

capacity
Int32

NameValueCollection に格納できるエントリ数の初期値。

col
NameValueCollection

新しい NameValueCollection インスタンスにコピーする NameValueCollection

例外

capacity が 0 未満です。

colnullです。

注釈

NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 既定のハッシュ コード プロバイダーは、CaseInsensitiveHashCodeProviderです。

比較演算子は、2 つのキーが等しいかどうかを判断します。 既定の比較子は です CaseInsensitiveComparer

このコンストラクターは O(n) 操作です。ここで n 、 は capacityです。 の要素colの数が よりcapacity大きい場合、このコンストラクターは O( + nm) 操作になります。ここでn、 は capacitymcol要素の数です。

こちらもご覧ください

適用対象

NameValueCollection(SerializationInfo, StreamingContext)

注意事項

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

シリアル化でき、指定した SerializationInfoStreamingContext を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

protected:
 NameValueCollection(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected NameValueCollection (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected NameValueCollection (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Collections.Specialized.NameValueCollection : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Collections.Specialized.NameValueCollection
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Collections.Specialized.NameValueCollection : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Collections.Specialized.NameValueCollection
Protected Sub New (info As SerializationInfo, context As StreamingContext)

パラメーター

info
SerializationInfo

新しい NameValueCollection インスタンスをシリアル化するために必要な情報を格納する SerializationInfo オブジェクト。

context
StreamingContext

新しい NameValueCollection インスタンスに関連付けられているシリアル化ストリームの転送元および転送先を格納する StreamingContext オブジェクト。

属性

注釈

このコンストラクターは O(1) 操作です。

こちらもご覧ください

適用対象

NameValueCollection(Int32, IHashCodeProvider, IComparer)

注意事項

Please use NameValueCollection(Int32, IEqualityComparer) instead.

注意事項

This constructor has been deprecated. Use NameValueCollection(Int32, IEqualityComparer) instead.

空で、指定した初期量を備え、指定したハッシュ コード プロバイダーと指定した比較子を使用する、NameValueCollection クラスの新しいインスタンスを初期化します。

public:
 NameValueCollection(int capacity, System::Collections::IHashCodeProvider ^ hashProvider, System::Collections::IComparer ^ comparer);
[System.Obsolete("Please use NameValueCollection(Int32, IEqualityComparer) instead.")]
public NameValueCollection (int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer);
[System.Obsolete("This constructor has been deprecated. Use NameValueCollection(Int32, IEqualityComparer) instead.")]
public NameValueCollection (int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer);
[System.Obsolete("Please use NameValueCollection(Int32, IEqualityComparer) instead.")]
public NameValueCollection (int capacity, System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer);
public NameValueCollection (int capacity, System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer);
[<System.Obsolete("Please use NameValueCollection(Int32, IEqualityComparer) instead.")>]
new System.Collections.Specialized.NameValueCollection : int * System.Collections.IHashCodeProvider * System.Collections.IComparer -> System.Collections.Specialized.NameValueCollection
[<System.Obsolete("This constructor has been deprecated. Use NameValueCollection(Int32, IEqualityComparer) instead.")>]
new System.Collections.Specialized.NameValueCollection : int * System.Collections.IHashCodeProvider * System.Collections.IComparer -> System.Collections.Specialized.NameValueCollection
new System.Collections.Specialized.NameValueCollection : int * System.Collections.IHashCodeProvider * System.Collections.IComparer -> System.Collections.Specialized.NameValueCollection
Public Sub New (capacity As Integer, hashProvider As IHashCodeProvider, comparer As IComparer)

パラメーター

capacity
Int32

NameValueCollection に格納できるエントリ数の初期値。

hashProvider
IHashCodeProvider

NameValueCollection 内のすべてのキーのハッシュ コードを提供する IHashCodeProvider

comparer
IComparer

2 つのキーが等しいかどうかを判断するために使用する IComparer

属性

例外

capacity が 0 未満です。

注釈

NameValueCollection 容量は、 が保持できる要素 NameValueCollection の数です。 要素が に NameValueCollection追加されると、内部配列を再割り当てすることで、必要に応じて容量が自動的に増加します。

コレクションのサイズを見積もることができる場合、初期容量を指定すると、 に要素を追加しながら、多数のサイズ変更操作を実行する NameValueCollection必要がなくなります。

ハッシュ コード プロバイダーは、NameValueCollection内のキーにハッシュ コードを与えます。 既定のハッシュ コード プロバイダーは、CaseInsensitiveHashCodeProviderです。

比較演算子は、2 つのキーが等しいかどうかを判断します。 既定の比較子は です CaseInsensitiveComparer

このコンストラクターは O(n) 操作です。ここで n 、 は capacityです。

こちらもご覧ください

適用対象