Snippet: if TryParse

property value
IDE VS Code
Language C#
Title if TryParse
Shortcut iftp
Description if statement with condition whether TryParse method returns true.

Placeholders

Identifier Tooltip Default Value
_type The type of the value to parse T
result The result x
value The value to parse value

Code

T x;
if (T.TryParse(value, out x)) {
	
}