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_GetTheStringValueOfAnEnumerationValue_s_142728_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-06-12  |  1KB  |  35 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>Find the Name of an Enumeration Value</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Gets the string name of an enumeration value.</Description>
  8.       <Shortcut>EnumStr</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Imports>
  12.         <Import>
  13.           <Namespace>Microsoft.VisualBasic</Namespace>
  14.         </Import>
  15.       </Imports>
  16.       <Declarations>
  17.         <Object>
  18.           <ID>EnumerationName</ID>
  19.           <Type>System.Enum
  20.           </Type>
  21.           <ToolTip>Replace with the name of the enumeration.</ToolTip>
  22.           <Default>DateInterval</Default>
  23.         </Object>
  24.         <Literal>
  25.           <ID>EnumValue</ID>
  26.           <Type>Integer</Type>
  27.           <ToolTip>Replace this with the value of the enumeration constant.</ToolTip>
  28.           <Default>0</Default>
  29.         </Literal>
  30.       </Declarations>
  31.       <Code Language="VB" Kind="method body"><![CDATA[Dim name As String = _
  32.     System.Enum.GetName(GetType($EnumerationName$), $EnumValue$)]]></Code>
  33.     </Snippet>
  34.   </CodeSnippet>
  35. </CodeSnippets>