ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Editing Namespace / ToolOptionsEmbeddableControl Class / GetToolOption<T> Method
the type of the value to be obtained; normally this will be a nullable type in order to accommodate the possibility of multiple different values
the key that identifies the tool option
a value to be returned if the key is not present within the current ToolOptions
an optional value to be returned when multiple (different) values are present - this can only happen in the case of multiple selected templates in TemplateProperties
Version

GetToolOption<T> Method
Gets a tool option from the current ToolOptions
Syntax
protected T GetToolOption<T>( 
   string key,
   T defaultValue,
   T differentValue
)

Parameters

key
the key that identifies the tool option
defaultValue
a value to be returned if the key is not present within the current ToolOptions
differentValue
an optional value to be returned when multiple (different) values are present - this can only happen in the case of multiple selected templates in TemplateProperties

Type Parameters

T
the type of the value to be obtained; normally this will be a nullable type in order to accommodate the possibility of multiple different values

Return Value

the value found, or defaultValue, or differentValue
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also