VB - Property With Region

By , 9/21/2010
(1 ratings)
Creates a VB.net Property with Region
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Property With Region</Title>
      <Author></Author>
      <Description>VB.NET version of Mike's code snippet for property with region</Description>
      <HelpUrl />
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Keywords />
      <Shortcut>prop</Shortcut>
    </Header>
    <Snippet>
      <References />
      <Imports />
      <Declarations>
        <Literal Editable="true">
          <ID>region</ID>
          <Type />
          <ToolTip>Region Name</ToolTip>
          <Default>RegionName</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>type</ID>
          <Type />
          <ToolTip>Property type</ToolTip>
          <Default>Integer</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>property</ID>
          <Type />
          <ToolTip>Property name</ToolTip>
          <Default>MyProperty</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>field</ID>
          <Type />
          <ToolTip>The variable backing this property</ToolTip>
          <Default>myVar</Default>
          <Function></Function>
        </Literal>
      </Declarations>
      <Code Language="vb" Kind="method body" Delimiter="$"><![CDATA[ 
  #Region "$region$"
  private $field$ as $type$

	Public Property $property$ As $type$
        Get
            Return $field$
        End Get
        Set(ByVal value As $type$)
            $field$ = value
        End Set
    End Property
	
  #End Region]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
Tagged with vb.net.

Comments

 

Log in, to comment!