Recommended Reading

MethodStatic

Description

Creates a Shared Public Function with the given type and name.

Usage

<type> <name> ms

Example

Source Code

<?xml version="1.0" encoding="utf-8"?>
<Commands xmlns="http://schemas.devprojects.net/AutoCode/v4.0">
  <Command name="MethodStatic" version="1.0">
    
    <CommandBehavior>
      <CommandLine shortcut="ms" />
      <ActiveDocument extensions=".vb"/>
    </CommandBehavior>

    <CommandInfo>
      <LanguageCategory>VB.NET</LanguageCategory>
      <Category>Members/Methods</Category>
      <Usage>
        <![CDATA[<type> <name> ms]]>
      </Usage>
      <Description>Creates a Shared Public Function with the given type and name.</Description>
      <Author>DevProjects</Author>
      <HelpUrl>http://help.devprojects.net/gallery/command/methodstatic</HelpUrl>
    </CommandInfo>

    <CommandCode language="vb">

      <Codes>

        <Code id="Code1">
          <![CDATA[Public Shared Function <#=ToPascalCase(args(1))#>(]]>
        </Code>

        <Code id="Code2">
          <![CDATA[) As <#=args(0)#>

        End Function]]>
        </Code>

      </Codes>

      <!-- Formats the rendered code; from the beginning of 'Code1' until the end of 'Code2' -->
      <SmartFormat>
        <Start codeElement="Code1" codePoint="StartOfElement" />
        <End codeElement="Code2" codePoint="EndOfElement" />
      </SmartFormat>

      <!-- Positions cursor at the end of 'Code1', inside the parenthesis -->
      <Selection codeElement="Code1" codePoint="EndOfElement" />

    </CommandCode>
  
    <Signature><![CDATA[
      VZGSpdHKRje2GWaNiN8xjoI4J71dYLN1K2WH3BDqz0eJ6+9X6shSO13cw
      FImPu5fC3cEHZ6N4R+XWVG01581NbGJMN2mz4QEz3oSBv2sR4NyK2Ocb2
      HhkGuIJYjslitrAYzrdTYjE2x/yyGIVIlnrQQEHMu8RjoEmq1/hqKzKTI=
    ]]></Signature>

</Command>
</Commands>