Method TryGetValue
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
TryGetValue<T>(out T?)
Attempts to parse the current interaction option value into the requested type without throwing.
public bool TryGetValue<T>(out T? value)
Parameters
valueTThe parsed value when successful; otherwise the default value for
T.
Returns
Type Parameters
TThe target value type to read.
Remarks
This is especially useful for autocomplete providers, where focused options can contain partially typed text that is not yet valid for the declared command option type.