NUnitAsp

FormVariables Members

FormVariables overview

Public Instance Constructors

FormVariables ConstructorInitializes a new instance of the FormVariables class.

Public Instance Methods

Add 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 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 Check if a name/value pair is in the collection. It could exist more than once.
ContainsAny Check if a particular name has any values. There could be more than one name/value pair with the specified name.
Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
Remove 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 Remove all form variables with a particular name.
Replace Replace a specific name/value pair.
ReplaceAll Replace all form variables with a particular name. This is the same as calling RemoveAll and then Add.
ToString 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 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.

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

FormVariables Class | NUnit.Extensions.Asp Namespace