﻿<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title> Reading line from console </Title>
            <Description> Expansion snippet for reading line from console. </Description>
            <Author>Microsoft Corporation</Author>
            <SnippetTypes>          
                <SnippetType> Expansion </SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID> Line</ID>
                    <Default> strLine </Default>
                    <ToolTip> Variable to hold a string read from console. </ToolTip>
                </Literal>
            </Declarations>
            <Code Language="vjsharp" Format="CData"><![CDATA[String $Line$ = ""; //string variable to store the line read from console
try 
{
    java.io.BufferedReader objBuffReader = new java.io.BufferedReader(
                                            new java.io.InputStreamReader(
                                                    System.in));
    $Line$ = objBuffReader.readLine();
}
catch (java.io.IOException e) 
{
    System.out.println("Error: Invalid IO operation ");
}
$selected$ $end$
]]>
</Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>
