메소드 | 설명 | |
---|---|---|
Add ( string name, string value ) : void |
Add a name/value pair. Add doesn't overwrite any existing pairs with the same name, so in most cases, ReplaceAll is more appropriate.
|
|
AllValuesOf ( string name ) : string[] |
Returns all the values associated with the specified name. Returns an empty (zero-length) array if there aren't any. ValueOf is more convenient when there's exactly one name/value pair with the specified name.
|
|
Contains ( string name, string value ) : bool |
Check if a name/value pair is in the collection. It could exist more than once.
|
|
ContainsAny ( string name ) : bool |
Check if a particular name has any values. There could be more than one name/value pair with the specified name.
|
|
Remove ( string name, string value ) : void |
Remove a specific name/value pair. If the pair is in the collection more than once, this method will only remove one of them.
|
|
RemoveAll ( string name ) : void |
Remove all form variables with a particular name.
|
|
Replace ( string name, string oldValue, string newValue ) : void |
Replace a specific name/value pair.
|
|
ReplaceAll ( string name, string newValue ) : void |
Replace all form variables with a particular name. This is the same as calling RemoveAll and then Add.
|
|
ToString ( ) : string |
Serializes all the name/value pairs into a string. The format of the string matches the HTTP protocol specification for transmitting form variables to a server. This can be handy for checking the form variables in your web page. Generally you won't be sending it to a server because HttpClient handles that for you.
|
|
ValueOf ( string name ) : string |
Returns the value of the name/value pair with the specified name. Throws an exception if there aren't any pairs with that name or if there's more than one. Use AllValuesOf to handle cases where there isn't exactly one name/value pair with the requested name.
|
메소드 | 설명 | |
---|---|---|
AllIndexesOf ( string name ) : |
||
IndexOf ( string name, string value ) : int |
public Contains ( string name, string value ) : bool | ||
name | string | |
value | string | |
리턴 | bool |
public Replace ( string name, string oldValue, string newValue ) : void | ||
name | string | |
oldValue | string | |
newValue | string | |
리턴 | void |
public ReplaceAll ( string name, string newValue ) : void | ||
name | string | |
newValue | string | |
리턴 | void |