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_FuncWithVarParams_snippet_142755_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-06-12  |  2KB  |  59 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 Function with a Parameter Array</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Defines a Function that takes a variable number of parameters.</Description>
  8.       <Shortcut>FuncParArr</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Imports>
  12.         <Import>
  13.           <Namespace>System</Namespace>
  14.         </Import>
  15.         <Import>
  16.           <Namespace>Microsoft.VisualBasic</Namespace>
  17.         </Import>
  18.       </Imports>
  19.       <Declarations>
  20.         <Literal>
  21.           <ID>MethodName</ID>
  22.           <Type></Type>
  23.           <ToolTip>Replace with the name of the function.</ToolTip>
  24.           <Default>MyMethod</Default>
  25.         </Literal>
  26.         <Literal>
  27.           <ID>ParamType</ID>
  28.           <Type></Type>
  29.           <ToolTip>Replace with the data type of the parameter.</ToolTip>
  30.           <Default>Integer</Default>
  31.         </Literal>
  32.         <Literal>
  33.           <ID>ParamName</ID>
  34.           <Type></Type>
  35.           <ToolTip>Replace with the name of the parameter.</ToolTip>
  36.           <Default>paramOne</Default>
  37.         </Literal>
  38.         <Literal>
  39.           <ID>ReturnType</ID>
  40.           <Type></Type>
  41.           <ToolTip>Replace with the return type of the function.</ToolTip>
  42.           <Default>Integer</Default>
  43.         </Literal>
  44.         <Literal>
  45.           <ID>ReturnValue</ID>
  46.           <Type></Type>
  47.           <ToolTip>Replace with the return value of the function.</ToolTip>
  48.           <Default>0</Default>
  49.         </Literal>
  50.       </Declarations>
  51.       <Code Language="VB" Kind="method decl"><![CDATA[Function $MethodName$(ByVal ParamArray $ParamName$() As $ParamType$) As $ReturnType$
  52.     For index As Integer = 0 To $paramName$.Length - 1
  53.  
  54.     Next
  55.     Return $ReturnValue$
  56. End Function]]></Code>
  57.     </Snippet>
  58.   </CodeSnippet>
  59. </CodeSnippets>