Click or drag to resize

SecurityKey(String) Constructor

Constructs a SecurityKey object using the specified string security key or throws a FormatException if the string is clearly invalid.

Namespace: DegreeDays.Api
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public SecurityKey(
	string stringSecurityKey
)

Parameters

stringSecurityKey  String
A Degree Days.net API security key.
Exceptions
ExceptionCondition
ArgumentNullExceptionstringSecurityKey is null.
FormatExceptionstringSecurityKey cannot reasonably be parsed as a Degree Days.net API security key (see these remarks for a description of the correct format).
Remarks

This constructor is somewhat tolerant of imperfect user input. It will try to intelligently handle upper-case letters, white space, and missing or non-hyphen block separators. If you're storing or displaying a string key that a user has entered, make sure to use the string returned by ToStringKey, as that will be the corrected key in its canonical form.

See Also