Method CreateUserAgent
CreateUserAgent(string, string)
Creates a user agent of the form of the default UserAgent: the specified product name and version followed by the operating system,
such as MyApp/2.1.0 (Microsoft Windows 10.0.26100). Parentheses, backslashes and characters other than printable ASCII are replaced in the
description of the operating system, which is left out if it is empty.
Declaration
protected static string CreateUserAgent(string productName, string productVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| string | productName | The name of the product. It must be a token: one or more ASCII letters, digits and characters out of
|
| string | productVersion | The version of the product, such as |
Returns
| Type | Description |
|---|---|
| string |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|