Професионална програма
Loading...
MartinMinev avatar MartinMinev 1 Точки

snippet Console.ReadLine

Колеги,

да има някой от вас snippet Console.ReadLine, т.е. тастатурна комбинация? На мен лично ми писна да го пиша, а в Гугъл не намерих нищо свястно. Благодаря!

Тагове:
0
Fundamentals Module
Stoikokolev avatar Stoikokolev 21 Точки
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
  <CodeSnippet Format="1.0.0">
 
    <Header>
 
      <Title>ipr</Title>
      <Description>Code snippet for creating double variable waiting for user input</Description>
      <Author>Stoyko Kolev</Author>
      <Shortcut>dpr</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
 
    </Header>
 
    <Snippet>
     
      <Declarations>
        <Literal >
          <ID>name</ID>
          <Tooltip>Name of the variable</Tooltip>
          <Default>name</Default>
        </Literal>
      </Declarations>
 
      <Code Language="CSharp">
        <![CDATA[double $name$ = double.Parse(Console.ReadLine());
               $end$]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
  <CodeSnippet Format="1.0.0">
 
    <Header>
 
      <Title>ipr</Title>
      <Description>Code snippet for creating int variable waiting for user input</Description>
      <Author>Stoyko Kolev</Author>
      <Shortcut>ipr</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
 
    </Header>
 
    <Snippet>
     
      <Declarations>
        <Literal >
          <ID>name</ID>
          <Tooltip>Name of the variable</Tooltip>
          <Default>name</Default>
        </Literal>
      </Declarations>
 
      <Code Language="CSharp">
        <![CDATA[int $name$ = int.Parse(Console.ReadLine());
               $end$]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
  <CodeSnippet Format="1.0.0">
 
    <Header>
 
      <Title>str</Title>
      <Description>Code snippet for creating string variable waiting for user input</Description>
      <Author>Stoyko Kolev</Author>
      <Shortcut>str</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
 
    </Header>
 
    <Snippet>
 
      <Declarations>
        <Literal >
          <ID>name</ID>
          <ToolТip>Name of the variable</ToolТip>
          <Default>name</Default>
        </Literal>
      </Declarations>
 
      <Code Language="CSharp">
        <![CDATA[string $name$ = Console.ReadLine();
               $end$]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

за double.Parse, int.Parse и string - dpr,ipr,str

0
15/11/2020 15:47:42
MartinMinev avatar MartinMinev 1 Точки

Благгодаря много! Бях пропуснал да напиша, че ми трябват за С шарп. Такка ли е? И сега трябва да се импортират във ВС 2019 чрез снипет мениджъра, нали?

0
Stoikokolev avatar Stoikokolev 21 Точки

Записваш текста във файл с разширение .snippet и го местиш в папката на Visual Studio / Code Snippets / My Code Snippets

0
MartinMinev avatar MartinMinev 1 Точки

Благодаря още веднъж!

0