'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.