, Visual C#



63.1. Module1.cs .

using System;

// Timers:

using System.Timers;

namespace Animated_text_on_console

{

/// <summary>

/// Summary description for Class1.

/// </summary>

class Class1

{

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main(string[] args)

{

// TODO: Add code to start application here

//

// ,

// Interval ,

//3000 3 :

System.Timers.Timer myTimer =

new System.Timers.Timer(3000);

myTimer.Elapsed+=

new ElapsedEventHandler(OnTimedEvent);

//

// ,

// //:

//myTimer.AutoReset = false;

// :

myTimer.Enabled = true;

// ,

// :

Console.WriteLine(

" ,

c + Enter.");

//

// while,

//

// c + Enter:

while(Console.Read()!='c');

}

//

// Interval :

private static void OnTimedEvent(object source,

ElapsedEventArgs e)

{

// :

Console.WriteLine(

"

Enter:");

}

}

}

, . , Visual C#. , ( ) Visual Basic [8].





- -  - -  - -