﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Retrieve an Environment Variable</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Retrieves the value of an environment variable.</Description>
      <Shortcut>sysReadVar</Shortcut>
    </Header>
    <Snippet>
      <Imports>
        <Import>
          <Namespace>System</Namespace>
        </Import>
        <Import>
          <Namespace>Microsoft.VisualBasic</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal>
          <ID>Variable</ID>
          <Type>String</Type>
          <ToolTip>Replace with the environment variable name.</ToolTip>
          <Default>"Variable"</Default>
        </Literal>
        <Literal>
          <ID>ErrorMessage</ID>
          <Type>String</Type>
          <ToolTip>Replace with your string.</ToolTip>
          <Default>"The environment variable was not found."</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim value = My.Application.GetEnvironmentVariable($Variable$)]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>