Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Snippet - "Type Writer" Effect in the Console

I am interested why you choose the number 43 :)
Surprised nobody's bashed you for this, it's very unimpressive. Ah damn I hate the syntax when people use symbols to explicitly specify a type "$" for string etc, very unreadable in my opinion. Don't know if you know already but the compiler doesn't require you to explicitly define a type when you use the 'Dim' keyword. If you where to type for example, "Dim TheLights = false" and hovered your mouse over 'Dim' it'd indicate that it knows that the object was of type boolean. I'm only putting that out there because I guess your justification, or anybody else's for that matter for using these characters to define a type is that it shortens code / is easier to type when in fact you can make it shorter yet while not using what I imagine are depreciated methods.
(Jul 9, 2012 03:14 PM)SomeWhiteGuy Wrote:  I respect your opinion, but that's all it is, an opinion.

Thank for your comment.

Its even less then an opinion, its an preference.
Yea. 43. What a random choice of a number. Hahaha. You should make it play a key stroking sound when it happens.
I have seen a few members use a suffix character to define datatypes. I try to get members to avoid legacy code but this goes back way beyond Microsoft and Visual Basic. This is BASIC. I can't personally see any appeal in using a single suffix. Each to there own though :)
(Jul 9, 2012 11:20 PM)ident Wrote:  I have seen a few members use a suffix character to define datatypes. I try to get members to avoid legacy code but this goes back way beyond Microsoft and Visual Basic. This is BASIC. I can't personally see any appeal in using a single suffix. Each to there own though :)

It's more or less a habit, it almost doesn't look complete without the suffix, although I am slowly transitioning.


Also, the concept makes for a pretty cool, uhh, hack sequence?

Spoiler (Click to View)
Hey man, any ideas how can I animate a current line?

like:

1st it'll look like:
Loading -
then
Loading /
then
Loading |
then
Loading \
then loop again until i call exit loop
(Jul 11, 2012 03:32 AM)Spuderman Wrote:  Hey man, any ideas how can I animate a current line?

like:

1st it'll look like:
Loading -
then
Loading /
then
Loading |
then
Loading \
then loop again until i call exit loop

If you close the line with "\r" then it will overwrite the string, like this:
Code
for (int i = 0; i < 100; i++)
  {
    Console.Write(i.ToString() + "\r");
    System.Threading.Thread.Sleep(100);
  }

  Console.Read();


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by еlixirSep 9, 2022 06:31 AM 0 132 Sep 9, 2022 06:31 AM
Last Post: еlixir
[C] by maryousJul 24, 2022 03:35 PM 0 161 Jul 24, 2022 03:35 PM
Last Post: maryous
[Python] by datguy.devNov 28, 2019 10:37 PM 4 298 Nov 28, 2019 10:37 PM
Last Post: Eternal Darkness