-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.TryParse.snippet
33 lines (33 loc) · 1.02 KB
/
type.TryParse.snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>type.TryParse</Title>
<Author>DepthRel</Author>
<Description>Call insert of type.TryParse(input, out var value)</Description>
<Shortcut>tp</Shortcut>
</Header>
<Snippet>
<Code Language="CSharp">
<![CDATA[$Type$.TryParse($Input$, out var $Number$)$end$]]>
</Code>
<Declarations>
<Literal>
<ID>Type</ID>
<ToolTip>The type of parse</ToolTip>
<Default>long</Default>
</Literal>
<Literal>
<ID>Number</ID>
<ToolTip>Result variable name</ToolTip>
<Default>number</Default>
</Literal>
<Literal>
<ID>Input</ID>
<ToolTip>Input string containing a number</ToolTip>
<Default>Console.ReadLine()</Default>
</Literal>
</Declarations>
</Snippet>
</CodeSnippet>
</CodeSnippets>