Categories > Coding > C# >
[REL] Animated Console.WriteLine()
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?
Random quote here...
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
Cancel
Post
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);
}
}
;)
Cancel
Post
Im netral, not evil, not too kind either.
Random quote here...
Replied
i think you forgot that c#'s comments start with '//', but nice
Cancel
Post
Replied
@63568 Yea thats good,
I Just showing example for another method to do it, its prob works the same but :/
Cancel
Post
Im netral, not evil, not too kind either.
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");
Cancel
Post
https://media.discordapp.net/attachments/1010636204225601659/1012865624797610044/sKQybOLT.gif
Random quote here...
Replied
Makes me sad because I would have done this line for line LMFAOO
Cancel
Post
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
Random quote here...
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post