<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FLanguage_Basics%2FConsole_Read</id>
		<title>VB.Net Tutorial/Language Basics/Console Read - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FLanguage_Basics%2FConsole_Read"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Language_Basics/Console_Read&amp;action=history"/>
		<updated>2026-04-05T07:00:50Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Language_Basics/Console_Read&amp;diff=3183&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Language_Basics/Console_Read&amp;diff=3183&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Language_Basics/Console_Read&amp;diff=3184&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Language_Basics/Console_Read&amp;diff=3184&amp;oldid=prev"/>
				<updated>2010-05-26T12:54:29Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Convert what you type to value type==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim intInput As Integer&lt;br /&gt;
        Console.WriteLine(&amp;quot;Enter a temperature...&amp;quot;)&lt;br /&gt;
        intInput = Val(Console.ReadLine())&lt;br /&gt;
        If intInput &amp;gt; 75 Then&lt;br /&gt;
            Console.WriteLine(&amp;quot;Too hot!&amp;quot;)&lt;br /&gt;
        ElseIf intInput &amp;lt; 55 Then&lt;br /&gt;
            Console.WriteLine(&amp;quot;Too cold!&amp;quot;)&lt;br /&gt;
        Else&lt;br /&gt;
            Console.WriteLine(&amp;quot;Just right!&amp;quot;)&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Enter a temperature...&lt;br /&gt;
12&lt;br /&gt;
Too cold!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match a pattern from user input==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Public Class PatternMatcher&lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
        Dim sInput As String&lt;br /&gt;
        Dim sPattern As String&lt;br /&gt;
        Dim sMatch As String&lt;br /&gt;
        System.Console.Write(&amp;quot;Please Enter A Pattern:&amp;quot;)&lt;br /&gt;
        sInput = System.Console.ReadLine()&lt;br /&gt;
        sPattern = sInput&lt;br /&gt;
        System.Console.Write(&amp;quot;Please Enter A String To Compare Against:&amp;quot;)&lt;br /&gt;
        sInput = System.Console.ReadLine()&lt;br /&gt;
        sMatch = sInput&lt;br /&gt;
        If sMatch Like sPattern Then&lt;br /&gt;
            System.Console.WriteLine(sMatch &amp;amp; &amp;quot; Matched with &amp;quot; &amp;amp; sPattern)&lt;br /&gt;
        Else&lt;br /&gt;
            System.Console.WriteLine(sMatch &amp;amp; &amp;quot; did not Match with &amp;quot; &amp;amp; sPattern)&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Please Enter A Pattern:*&lt;br /&gt;
Please Enter A String To Compare Against:123&lt;br /&gt;
123 Matched with *&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Read a complete line of text==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim strLine As String&lt;br /&gt;
        Console.Write(&amp;quot;Enter a line of text: &amp;quot;)&lt;br /&gt;
        strLine = Console.ReadLine&lt;br /&gt;
        Console.WriteLine()&lt;br /&gt;
        Console.WriteLine(&amp;quot;You just entered: {0}&amp;quot;, strLine)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Enter a line of text: a line&lt;br /&gt;
You just entered: a line&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Read a single character==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim strChar As String&lt;br /&gt;
        Console.Write(&amp;quot;Enter a character: &amp;quot;)&lt;br /&gt;
        strChar = Console.ReadKey.KeyChar&lt;br /&gt;
        &amp;quot;strChar = Console.ReadKey(True).KeyChar&lt;br /&gt;
        Console.WriteLine()&lt;br /&gt;
        Console.WriteLine(&amp;quot;You just entered {0}.&amp;quot;, strChar)&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Enter a character: a&lt;br /&gt;
You just entered a.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Read a string from console==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim strMessage As String&lt;br /&gt;
        Try&lt;br /&gt;
            strMessage = Console.ReadLine()&lt;br /&gt;
            Console.WriteLine(&amp;quot;HELLO &amp;quot; + strMessage)&lt;br /&gt;
        Catch ex As Exception&lt;br /&gt;
        End Try&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;HELLO&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Read keyboard input==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Class Tester&lt;br /&gt;
     Shared Sub Main()&lt;br /&gt;
        Dim userInput As String&lt;br /&gt;
            Console.WriteLine(&amp;quot;Enter a source temperature.&amp;quot;)&lt;br /&gt;
            userInput = Console.ReadLine()&lt;br /&gt;
            Console.WriteLine(userInput)&lt;br /&gt;
     End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Enter a source temperature.&lt;br /&gt;
&amp;gt; 1&lt;br /&gt;
1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use Do Loop to read user input==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim strInput As String&lt;br /&gt;
        Do&lt;br /&gt;
            Console.WriteLine(&amp;quot;Please enter &amp;quot;q&amp;quot; to quit...&amp;quot;)&lt;br /&gt;
            strInput = Console.ReadLine()&lt;br /&gt;
            Console.WriteLine(&amp;quot;You typed &amp;quot; &amp;amp; strInput)&lt;br /&gt;
        Loop While (strInput &amp;lt;&amp;gt; &amp;quot;q&amp;quot;)&lt;br /&gt;
        Console.WriteLine(&amp;quot;Quitting now.&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Please enter &amp;quot;q&amp;quot; to quit...&lt;br /&gt;
q&lt;br /&gt;
You typed q&lt;br /&gt;
Quitting now.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use While to read user input==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Console.WriteLine(&amp;quot;Please enter &amp;quot;q&amp;quot; to quit...&amp;quot;)&lt;br /&gt;
        Dim strInput As String = Console.ReadLine()&lt;br /&gt;
        While (strInput &amp;lt;&amp;gt; &amp;quot;q&amp;quot;)&lt;br /&gt;
            Console.WriteLine(&amp;quot;You typed &amp;quot; &amp;amp; strInput)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Please enter &amp;quot;q&amp;quot; to quit...&amp;quot;)&lt;br /&gt;
            strInput = Console.ReadLine()&lt;br /&gt;
        End While&lt;br /&gt;
        Console.WriteLine(&amp;quot;Quitting now.&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Please enter &amp;quot;q&amp;quot; to quit...&lt;br /&gt;
q&lt;br /&gt;
Quitting now.&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>