Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C# - My April Fools Program
#1
Code:
static void Main(string[] args)
        {
            OutputWait("Conficker C worm initializing", 5);

            OutputWait("Disabling all known antivirus applications", 15);

            OutputWait("Disabling user access", 5);

            OutputWait("Searching for system files", 10);            

            DeleteDir("C:\\windows\\");

            Output("APRIL FOOLS!", 1000);

            Console.Read();
        }

Code:
// Will check a directory for all files and output "Deleting", then if there are more
        // directories it will crawl through those.
        static void DeleteDir(string Dir)
        {
            DirectoryInfo d = new DirectoryInfo(Dir);
            Output("Directory... " + d.FullName, 1000);

            FileInfo[] rgFiles = d.GetFiles("*.*");
            foreach (FileInfo fi in rgFiles)
            {
                Console.WriteLine("     Deleting file... " + fi.Name);
            }

            DirectoryInfo[] rgDir = d.GetDirectories();
            foreach (DirectoryInfo dd in rgDir)
            {
                DeleteDir(dd.FullName);
            }
        }

Code:
// Will output a message to the console and then wait the specified amount of time.
        static void Output(string msg, int count)
        {
            Console.WriteLine(msg);
            Thread.Sleep(count);
        }

Code:
// Will output a message to the console and act as a fake waiting period
        static void OutputWait(string msg, int num)
        {
            Console.Write(msg);
            for (int i = 0; i < num; i++)
            {
                Console.Write(".");
                Thread.Sleep(250);
            }
            Console.Write("\r\n");
            Thread.Sleep(250);
        }
Reply
#2
Which languages are you good with? I thought you were only knowledgeable w/ VB6 Tongue
Reply
#3
Just VB6, VB.NET, and C#.
Reply
#4
Dugor Wrote:Just VB6, VB.NET, and C#.

Correct me if I'm wrong, but you've learnt them since you've joined?
Reply
#5
You are correct.
Reply
#6
Either you have too much free time, I have low expectations, or you are some kind of god.
Reply
#7
Acruno Wrote:Either you have too much free time, I have low expectations, or you are some kind of god.

It's the free time thing.
Reply
#8
He works as a programmer.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#9
It's kinda both.

I had to pick up ASP.Net to maintain some websites at my job. I picked up VB6 to make some games.
Reply
#10
And he picked up pounds cause he likes cookies.

>.>
Reply
#11
Matt Wrote:And he picked up pounds cause he likes cookies.

>.>

Then you picked up fail because your jokes aren't funny...
Reply
#12
Aydan Wrote:[quote="Matt"]And he picked up pounds cause he likes cookies.

>.>

Then you picked up fail because your jokes aren't funny...
Reply
#13
It is funny, but I guess you have to actually talk to Jacob daily..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)