<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FDevelopment_Class%2FConsole</id>
		<title>Csharp/C Sharp/Development Class/Console - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FDevelopment_Class%2FConsole"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Console&amp;action=history"/>
		<updated>2026-04-30T01:18:28Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Console&amp;diff=1260&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Console&amp;diff=1260&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:19Z</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;Версия 15:31, 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://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Console&amp;diff=1261&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Console&amp;diff=1261&amp;oldid=prev"/>
				<updated>2010-05-26T11:45: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;==Beep==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Media;&lt;br /&gt;
class MainClass {&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        Console.Beep();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Beep(==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Media;&lt;br /&gt;
class MainClass {&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        // Play a  beep with frequency as 200 and duration as 300&lt;br /&gt;
        Console.Beep(200, 300);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Change console foreground color and background color==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
public class Test{&lt;br /&gt;
   static void Main(string[] args){&lt;br /&gt;
      Console.Title = &amp;quot;Standard Console&amp;quot;;&lt;br /&gt;
      Console.ForegroundColor = ConsoleColor.Red;&lt;br /&gt;
      Console.BackgroundColor = ConsoleColor.Green;&lt;br /&gt;
      Console.WriteLine(&amp;quot;Press Enter to change the Console&amp;quot;s appearance.&amp;quot;);&lt;br /&gt;
      Console.ReadLine();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Clear console==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
public class Test{&lt;br /&gt;
   static void Main(string[] args){&lt;br /&gt;
      // Change the Console appearance and redisplay.&lt;br /&gt;
      Console.Title = &amp;quot;Cleared / Colored Console&amp;quot;;&lt;br /&gt;
      Console.ForegroundColor = ConsoleColor.Blue;&lt;br /&gt;
      Console.BackgroundColor = ConsoleColor.Yellow;&lt;br /&gt;
      Console.Clear();&lt;br /&gt;
      Console.WriteLine(&amp;quot;Press Enter to change the Console&amp;quot;s appearance.&amp;quot;);&lt;br /&gt;
      Console.ReadLine();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CursorVisible ResetColor SetWindowSize BufferHeight BufferWidth CursorLeft CursorSize CursorTop==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
    static void Main(string[] args) {&lt;br /&gt;
       // Change the console appearance and redisplay.&lt;br /&gt;
       Console.Title = &amp;quot;Resized Console&amp;quot;;&lt;br /&gt;
       Console.ResetColor();&lt;br /&gt;
       Console.Clear();&lt;br /&gt;
       Console.SetWindowSize(100, 50);&lt;br /&gt;
       Console.BufferHeight = 500;&lt;br /&gt;
       Console.BufferWidth = 100;&lt;br /&gt;
       Console.CursorLeft = 20;&lt;br /&gt;
       Console.CursorSize = 50;&lt;br /&gt;
       Console.CursorTop = 20;&lt;br /&gt;
       Console.CursorVisible = false;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Displaying the sum of two numbers input from the keyboard.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
public class Addition&lt;br /&gt;
{&lt;br /&gt;
   public static void Main( string[] args )&lt;br /&gt;
   {&lt;br /&gt;
      int number1; &lt;br /&gt;
      int number2; &lt;br /&gt;
      int sum; &lt;br /&gt;
      Console.Write( &amp;quot;Enter first integer: &amp;quot; ); &lt;br /&gt;
      number1 = Convert.ToInt32( Console.ReadLine() );&lt;br /&gt;
      Console.Write( &amp;quot;Enter second integer: &amp;quot; );&lt;br /&gt;
      number2 = Convert.ToInt32( Console.ReadLine() );&lt;br /&gt;
      sum = number1 + number2;&lt;br /&gt;
      Console.WriteLine( &amp;quot;Sum is {0}&amp;quot;, sum );&lt;br /&gt;
   } &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Echo some stats==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Text;&lt;br /&gt;
class Program {&lt;br /&gt;
    static void Main(string[] args) {&lt;br /&gt;
        Console.Write(&amp;quot;Enter your name: &amp;quot;);&lt;br /&gt;
        string s;&lt;br /&gt;
        s = Console.ReadLine();&lt;br /&gt;
        Console.WriteLine(&amp;quot;Hello, {0} &amp;quot;, s);&lt;br /&gt;
        Console.Write(&amp;quot;Enter your age: &amp;quot;);&lt;br /&gt;
        s = Console.ReadLine();&lt;br /&gt;
        Console.WriteLine(&amp;quot;You are {0} years old&amp;quot;, s);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Printing multiple lines of text with string formatting.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
public class Welcome4&lt;br /&gt;
{&lt;br /&gt;
   public static void Main( string[] args )&lt;br /&gt;
   {&lt;br /&gt;
      Console.WriteLine( &amp;quot;{0}\n{1}&amp;quot;, &amp;quot;Welcome to&amp;quot;, &amp;quot;C# Programming!&amp;quot; );&lt;br /&gt;
   } &lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Printing multiple lines with a single statement.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
public class Welcome3&lt;br /&gt;
{&lt;br /&gt;
   public static void Main( string[] args )&lt;br /&gt;
   {&lt;br /&gt;
      Console.WriteLine( &amp;quot;Welcome\nto\nC#\nProgramming!&amp;quot; );&lt;br /&gt;
   } &lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Printing one line of text with multiple statements.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
public class Welcome2 {&lt;br /&gt;
    public static void Main(string[] args) {&lt;br /&gt;
        Console.Write(&amp;quot;Welcome to &amp;quot;);&lt;br /&gt;
        Console.WriteLine(&amp;quot;C# Programming!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Read a line of string and check its length==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
class MainEntryPoint {&lt;br /&gt;
    static void Main(string[] args) {&lt;br /&gt;
        Console.WriteLine(&amp;quot;Type in a string&amp;quot;);&lt;br /&gt;
        string input;&lt;br /&gt;
        input = Console.ReadLine();&lt;br /&gt;
        if (input == &amp;quot;&amp;quot;) {&lt;br /&gt;
            Console.WriteLine(&amp;quot;You typed in an empty string&amp;quot;);&lt;br /&gt;
        } else if (input.Length &amp;lt; 5) {&lt;br /&gt;
            Console.WriteLine(&amp;quot;The string had less than 5 characters&amp;quot;);&lt;br /&gt;
        } else if (input.Length &amp;lt; 10) {&lt;br /&gt;
            Console.WriteLine(&amp;quot;The string had at least 5 but less than 10 characters&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        Console.WriteLine(&amp;quot;The string was &amp;quot; + input);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Set console: title, window size, buffer height and width, cursor position==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
public class Test{&lt;br /&gt;
   static void Main(string[] args){&lt;br /&gt;
&lt;br /&gt;
      // Change the Console appearance and redisplay.&lt;br /&gt;
      Console.Title = &amp;quot;Resized Console&amp;quot;;&lt;br /&gt;
      Console.ResetColor();&lt;br /&gt;
      Console.Clear();&lt;br /&gt;
      Console.SetWindowSize(100, 50);&lt;br /&gt;
      Console.BufferHeight = 500;&lt;br /&gt;
      Console.BufferWidth = 100;&lt;br /&gt;
      Console.CursorLeft = 20;&lt;br /&gt;
      Console.CursorSize = 50;&lt;br /&gt;
      Console.CursorTop = 20;&lt;br /&gt;
      Console.CursorVisible = false;&lt;br /&gt;
      Console.WriteLine(&amp;quot;Main method complete. Press Enter.&amp;quot;);&lt;br /&gt;
      Console.ReadLine();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Use Red and Green from ConsoleColor==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
    static void Main(string[] args) {&lt;br /&gt;
       // Change the console appearance and redisplay.&lt;br /&gt;
       Console.Title = &amp;quot;Colored Text&amp;quot;;&lt;br /&gt;
       Console.ForegroundColor = ConsoleColor.Red;&lt;br /&gt;
       Console.BackgroundColor = ConsoleColor.Green;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==WriteLine and Write==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
class ConsoleAdder {&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        int a = 15;&lt;br /&gt;
        int b = 744;&lt;br /&gt;
        int c = a + b;&lt;br /&gt;
        Console.Write(&amp;quot;The sum of &amp;quot;);&lt;br /&gt;
        Console.Write(a);&lt;br /&gt;
        Console.Write(&amp;quot; and &amp;quot;);&lt;br /&gt;
        Console.Write(b);&lt;br /&gt;
        Console.Write(&amp;quot; equals &amp;quot;);&lt;br /&gt;
        Console.WriteLine(c);&lt;br /&gt;
        Console.WriteLine(&amp;quot;The sum of &amp;quot; + a + &amp;quot; and &amp;quot; + b + &amp;quot; equals &amp;quot; + c);&lt;br /&gt;
        Console.WriteLine(&amp;quot;The sum of {0} and {1} equals {2}&amp;quot;, a, b, c);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>