<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Check if a string is a number</Title>
      <Shortcut>Checkifastringisanumber</Shortcut>
      <Description>Check if a string is a number [C#]</Description>
      <Author>Greg Gamble</Author>
      <HelpUrl>/PreviewSnippet.aspx?SnippetID=05682994-a3f5-4df8-80ec-a19b5f1285b9</HelpUrl>
      <SnippetTypes>
        <SnippetType>SurroundsWith</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Code Language="csharp"><![CDATA[/// <summary>
/// Check to see if string Is A Number
/// </summary>
/// <param name="i">String number to check</param>
/// <returns>bool - true if string is a real number</returns>
private bool IAN(string i)
{
	try
	{
		int.Parse(i);
	}
	catch
	{
		return false;
	}
	return true;
}]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>