| ValueEditorContextTryGetValueT Method |
Tries to take the value, cast it to the specified type and return it. If value isn't of expected type, false is returned.
Namespace: Slash.Unity.Common.GUI.ValueEditorsAssembly: Slash.Unity.Common (in Slash.Unity.Common.dll) Version: 1.0.6018.40182
Syntax public static bool TryGetValue<T>(
Object objectValue,
out T value
)
Public Shared Function TryGetValue(Of T) (
objectValue As Object,
<OutAttribute> ByRef value As T
) As Boolean
public:
generic<typename T>
static bool TryGetValue(
Object^ objectValue,
[OutAttribute] T% value
)
static member TryGetValue :
objectValue : Object *
value : 'T byref -> bool
Parameters
- objectValue
- Type: SystemObject
Object value. - value
- Type: T
Contains the value if it was casted successful; otherwise the default value of the specified type.
Type Parameters
- T
- Expected type of value.
Return Value
Type:
Boolean True if the value could be successful casted; otherwise, false.
See Also