home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / FL_ReadOnlyProperty_snippet_142759_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-06-12  |  1KB  |  40 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Define a ReadOnly Property</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Defines a ReadOnly Property with a backing field.</Description>
  8.       <Shortcut>PropRead</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Declarations>
  12.         <Literal>
  13.           <ID>PropertyName</ID>
  14.           <Type>String</Type>
  15.           <ToolTip>Replace with property name.</ToolTip>
  16.           <Default>NewProperty</Default>
  17.         </Literal>
  18.         <Literal>
  19.           <ID>PropertyType</ID>
  20.           <Type>
  21.           </Type>
  22.           <ToolTip>Replace with the property type.</ToolTip>
  23.           <Default>Integer</Default>
  24.         </Literal>
  25.         <Object>
  26.           <ID>PrivateVariable</ID>
  27.           <Type>Object</Type>
  28.           <ToolTip>Replace this with the private variable name.</ToolTip>
  29.           <Default>newPropertyValue</Default>
  30.         </Object>
  31.       </Declarations>
  32.       <Code Language="VB" Kind="method decl"><![CDATA[Private $PrivateVariable$ As $PropertyType$
  33. Public ReadOnly Property $PropertyName$() As $PropertyType$
  34.     Get
  35.         Return $PrivateVariable$ 
  36.     End Get
  37. End Property]]></Code>
  38.     </Snippet>
  39.   </CodeSnippet>
  40. </CodeSnippets>