Categories > Coding > C# >

[REL] Animated Console.WriteLine()

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

Posted

Yeah,

This code was not actually made by me but I think it's cool to release the code. The code is not that easy to guess for me tho, but anyways I found out the code.

 

public static void Print(string text, int speed = 40)
        {
            foreach (char c in text) // Looking for characters
            {
                Console.Write(c); // Type the characters
                System.Threading.Thread.Sleep(speed);
            }
            Console.WriteLine();
        }

Print("Example")

 

Pretty cool, right?

  • 0

Random quote here...

TERIHAX

i say im gay as a joke 🙀

Posts: 2240

Threads: 102

Joined: Jul, 2020

Reputation: 32

Replied

this is alright, you could do this if you want to change the speed: 

Print("ok", 100); // 100 is the speed in milliseconds

but im pretty sure oxygen u's bootstrapper has a better and more simpler version of it

  • 0

Posts: 870

Threads: 34

Joined: Aug, 2020

Reputation: 6

Replied

dude nice youtube lol exact code lol

  • 0

TERIHAX

i say im gay as a joke 🙀

Posts: 2240

Threads: 102

Joined: Jul, 2020

Reputation: 32

Replied

  • 0

Posts: 197

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

        public static void print(string Text, int Speed = 30)
        {
            if (string.IsNullOrEmpty(Text))
                return;

            for (int i = 0; i < Text.Length; i++)
            {
                Console.Write(Text[i]);
                Thread.Sleep(Speed);
            }
        }

 

;)

  • 0

Im netral, not evil, not too kind either.

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

Replied

@MaximusExploit bro i said it was not made by me wdym

  • 0

Random quote here...

MINISHXP

[REDACTED]

Posts: 976

Threads: 3

Joined: Jan, 2021

Reputation: 9

Replied

i think you forgot that c#'s comments start with '//', but nice

  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

@OrbitRBX just use foreach for this it's so much simpler :/

  • 0

Posts: 197

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

@63568 Yea thats good, 

 

I Just showing example for another method to do it, its prob works the same but :/

  • 0

Im netral, not evil, not too kind either.

eb_

Formally known as Shade

vip

Posts: 1045

Threads: 4

Joined: Jun, 2020

Reputation: 47

Replied

errrr ok but bruh why for comments you use lua comments for c#? kek 

-- This is lua comments ok
print("kek")
// This is C# comments ok
Console.WriteLine("Kek");
  • 0

https://media.discordapp.net/attachments/1010636204225601659/1012865624797610044/sKQybOLT.gif

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

Replied

@eb_ bro i didnt use the comments for a long time don't mind me lmfao

  • 0

Random quote here...

Beastsploits

Beast aka Kappaladi

Posts: 121

Threads: 29

Joined: Dec, 2019

Reputation: 3

Replied

Makes me sad because I would have done this line for line LMFAOO

  • 0

Know c# and trying to expand my knowledge in it.


Rep Goal [1,2,3,4,5,6,7,8,9,10]


Rickrolled Talan2016 : https://cdn.discordapp.com/attachments/852018376368979974/852033650593497128/unknown.png

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

Replied

  • 0

Random quote here...

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )