Method TryParse
TryParse(string, out Key)
Converts the provided string to a new Key instance.
public static bool TryParse(string text, out Key key)
Parameters
text
stringThe text to analyze. Formats supported are "Ctrl+X", "Alt+X", "Shift+X", "Ctrl+Alt+X", "Ctrl+Shift+X", "Alt+Shift+X", "Ctrl+Alt+Shift+X", "X", and "120" (Unicode codepoint).
The separator can be any character, not just Separator (e.g. "Ctrl@Alt@X").
key
KeyThe parsed value.
Returns
- bool
A boolean value indicating whether parsing was successful.