Merhaba arkadaşlar bugün sizlere Console'dan nasıl Matrix yapılır onu göstereceğim .
Öncelikle bir Console Projesini oluşturalım .
Ondan sonra kütüphaneye şu kodu ekliyelim :
Kütüphanenin tamamamı şu şekilde :
Kütüphanemize gerekli kütüphaneyi ekledikten sonra size vereceğim kodu resimdeki yere yapıştırın .
Matrix Kodu :
Kodların tamamı şu şekilde :
Gördüğünüz gibi çalıştı .
İyi forumlar ...
AR-GE KULÜBÜ
Öncelikle bir Console Projesini oluşturalım .
Ondan sonra kütüphaneye şu kodu ekliyelim :
Kod:
using System.Threading;
Kütüphanenin tamamamı şu şekilde :
Kod:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
Kütüphanemize gerekli kütüphaneyi ekledikten sonra size vereceğim kodu resimdeki yere yapıştırın .
Matrix Kodu :
Kod:
Console.ForegroundColor = ConsoleColor.Green;
Random RDN = new Random();
int sayı;
int art = 0;
for (int i = 0; ; i++)
{
sayı = RDN.Next(0, 10);
Console.Write(sayı);
Thread.Sleep(20);
art++;
Console.ForegroundColor = ConsoleColor.Green;
if (art == 10)
{
Console.ForegroundColor = ConsoleColor.White;
art = 0;
}
Console.Write(new string('\t', sayı));
}
Console.ReadKey();
Kodların tamamı şu şekilde :
Kod:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace Matrix
{
class Program
{
static **** Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Green;
Random RDN = new Random();
int sayı;
int art = 0;
for (int i = 0; ; i++)
{
sayı = RDN.Next(0, 10);
Console.Write(sayı);
Thread.Sleep(20);
art++;
Console.ForegroundColor = ConsoleColor.Green;
if (art == 10)
{
Console.ForegroundColor = ConsoleColor.White;
art = 0;
}
Console.Write(new string('\t', sayı));
}
Console.ReadKey();
}
}
}
Şimdi projemizi derleyelim ...
Gördüğünüz gibi çalıştı .
İyi forumlar ...
AR-GE KULÜBÜ
Son düzenleme: