Recommended Reading

StringFormatSurround

Description

Surrounds selected text with String.Format().

Usage

(Select Text) sf

Example

Source Code

<?xml version="1.0" encoding="utf-8"?>
<Commands xmlns="http://schemas.devprojects.net/AutoCode/v4.0">
  <Command name="StringFormatSurround" version="1.0" priority="90">
  <CommandBehavior>
    <CommandLine shortcut="sf" />
    <ActiveDocument requiresSelection="true" extensions=".cs"/>
  </CommandBehavior>

  <CommandInfo>
    <LanguageCategory>CSharp</LanguageCategory>
    <Category>Misc</Category>
    <Usage>(Select Text) sf</Usage>
    <Description>Surrounds selected text with String.Format().</Description>
    <Author>DevProjects</Author>
    <HelpUrl>http://help.devprojects.net/gallery/command/stringformatsurround</HelpUrl>
  </CommandInfo>

  <CommandCode language="csharp">

    <Codes>
      <Code id="Code1" codeElement="Selection" codePoint="StartOfSelection">
        <![CDATA[String.Format(]]>
      </Code>
      <Code id="Code2" codeElement="Selection" codePoint="EndOfSelection">
        <![CDATA[,I)]]>
      </Code>
    </Codes>

    <Selection codeElement="Code1" codePoint="EndOfSelection" clearSelection="true">
      <SelectText>I</SelectText>
    </Selection>
    
  </CommandCode>
  
     <Signature><![CDATA[
      qrI5n4evUCFf+aa9P3EpUSDkuzYsa5dr/laMFcFcmCR7s7Hf6jApQXXLb
      VLPjY/67yWBhwxuEtUVz5QIWgkyMD9nVNl82lzQ3V7O3TFhEk7T1t/Tyb
      c+ESWIVRf3dqzIun9p7T1smN0fZcpOrCL89xDvv2crADfdQ6D9uaODu+0=
    ]]></Signature>

</Command>
</Commands>