Complicated is bad, Simple is good

  • Archive
  • RSS

propnc.snippet

<?xml version=”1.0” encoding=”utf-8” ?>

<CodeSnippets xmlns=”http://schemas.microsoft.com/VisualStudio/CodeSnippet”>

  <CodeSnippet Format=”1.0.0”>

    <Header>

      <Title>NotifyPropertyChanged Code Snippet</Title>

      <Shortcut>propnc</Shortcut>

      <Author>David Salt</Author>

      <SnippetTypes>

        <SnippetType>Expansion</SnippetType>

      </SnippetTypes>

    </Header>

    <Snippet>

      <!— Add additional Snippet information here —>

      <Declarations>

        <Literal>

          <ID>propertytype</ID>

          <ToolTip>Replace the property type</ToolTip>

          <Default>string</Default>

        </Literal>

        <Literal>

          <ID>propertyname</ID>

          <ToolTip>Replace with a name of the property.</ToolTip>

          <Default>PropertyName</Default>

        </Literal>

      </Declarations>

      <Code Language=”CSharp”>

        <![CDATA[

private $propertytype$ _$propertyname$;

public $propertytype$ $propertyname$

{

get

{

return _$propertyname$;

}

set

{

if(_$propertyname$ != value)

{

_$propertyname$ = value;

OnNotifyPropertyChanged(“$propertyname$”);

}

}

}

$end$]]>

      </Code>

    </Snippet>

  </CodeSnippet>

</CodeSnippets>

  • 3 months ago
  • Permalink
  • Share
    Tweet
← Previous • Next →

About

  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr