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_LocateanElementinanArray_snippet_142573_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  1KB  |  31 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>Locate an Element in an Array </Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Finds the index of a given element in an array.</Description>
  8.       <Keywords>
  9.       </Keywords>
  10.       <Shortcut>arrLoc</Shortcut>
  11.     </Header>
  12.     <Snippet>
  13.       <Declarations>
  14.         <Object>
  15.           <ID>arrayName</ID>
  16.           <Type>Array</Type>
  17.           <ToolTip>Replace with the name of the array you want to search.</ToolTip>
  18.           <Default>myArray</Default>
  19.         </Object>
  20.         <Literal>
  21.           <ID>SearchString</ID>
  22.           <Type>String</Type>
  23.           <ToolTip>Replace with the value to search for.</ToolTip>
  24.           <Default>"value"</Default>
  25.         </Literal>
  26.       </Declarations>
  27.       <Code Language="VB" Kind="method body"><![CDATA[Dim index As Integer
  28.         index = Array.IndexOf($arrayName$, $SearchString$)]]></Code>
  29.     </Snippet>
  30.   </CodeSnippet>
  31. </CodeSnippets>