Forum > Coding >

[REL] Animated Console.WriteLine()

Posts: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

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: 1789

Threads: 92

Joined: Jul, 2020

Reputation: 30

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: 673

Threads: 30

Joined: Aug, 2020

Reputation: 6

Replied

dude nice youtube lol exact code lol

  • 0

TERIHAX

i say im gay as a joke 🙀

Posts: 1789

Threads: 92

Joined: Jul, 2020

Reputation: 30

Replied

  • 0

Posts: 166

Threads: 9

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: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

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

  • 0

Random quote here...

MINISHXP

minishxp

Posts: 813

Threads: 5

Joined: Jan, 2021

Reputation: 9

Replied

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

  • 0

hi123

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

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

  • 0

Posts: 166

Threads: 9

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: 920

Threads: 4

Joined: Jun, 2020

Reputation: 44

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: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

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

  • 0

Random quote here...

Posts: 114

Threads: 26

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: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

  • 0

Random quote here...

Users viewing this thread:

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