Snippet: if TryParse

property value
IDE Visual Studio
Language C#
Title if TryParse
Shortcut iftp
Description if statement with condition whether TryParse method returns true.
Snippet Types Expansion

Placeholders

Identifier Tooltip Default Value Editable Function Type Name
_type The type of the value to parse T yes
result The result x yes
value The value to parse value yes

Code

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