Click or drag to resize

AccountKey Constructor

Constructs an AccountKey object using the specified string account key or throws a FormatException if the string has the wrong format.

Namespace: DegreeDays.Api
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public AccountKey(
	string stringAccountKey
)

Parameters

stringAccountKey  String
A Degree Days.net API account key.
Exceptions
ExceptionCondition
ArgumentNullExceptionstringAccountKey is null.
FormatExceptionstringAccountKey cannot reasonably be parsed as a Degree Days.net API account 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 ToString, as that will be the corrected key in its canonical form.

See Also