Description

Gets a setting value for the specified key name.

Return Type

A Variant value.  

The setting value if it exists, otherwise the DefaultValue which will be Empty if it is omitted.

Syntax

object.Get (Key, [DefaultValue])

The Get Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McSettings.
KeyRequired. A String value.

Name of the setting to be retrieved.

DefaultValueOptional. A Variant value.

Value to return if the setting is missing.

Remarks

If the setting contains the persisted state of an object supporting IPersistPropertyBag, an uninitialized object of the same class can be passed as the second parameter and will receive the persisted information. McSettings itself can be used that way to create a setting hierarchy.