adTempus API
ArcanaDevelopment.adTempus.Client.Collections Namespace / OptionCollection Class / Get Method
The name of the option to get (case-insensitive)
If true, the option is created if it does not exist.


In This Topic
    Get Method
    In This Topic
    Gets the option with the specified name, optionally creating the option if it does not exist
    Syntax
    'Declaration
     
    
    <ContractAnnotationAttribute("createIfNonExistent:true=>notnull;createIfNonExistent:false=>canbenull")>
    Public Function Get( _
       ByVal optionName As String, _
       Optional ByVal createIfNonExistent As Boolean _
    ) As Option
    [ContractAnnotation("createIfNonExistent:true=>notnull;createIfNonExistent:false=>canbenull")]
    public Option Get( 
       string optionName,
       bool createIfNonExistent
    )
    [ContractAnnotation("createIfNonExistent:true=>notnull;createIfNonExistent:false=>canbenull")]
    public:
    Option^ Get( 
       String^ optionName,
       bool createIfNonExistent
    ) 

    Parameters

    optionName
    The name of the option to get (case-insensitive)
    createIfNonExistent
    If true, the option is created if it does not exist.

    Return Value

    The option with the specified name. If the collection does not contain an option with that name, returns a null reference (Nothing in Visual Basic) if createIfNonExistent if false; otherwise the method creates a new option with name optionName, adds it to the collection, and returns it.
    See Also