Anyone know some C#?

Discussion in 'Technology Talk & Help' started by Enkari!, Feb 3, 2012.

Thread Status:
Not open for further replies.
  1. Enkari!

    Enkari!

    70
    13
    4
    I've just started learning it at college in a new class and am trying to get a sort of 'head start' by teaching myself more at home.

    If there's anyone here that's up for sharing some information and helping me out that'd be sweeeeet <3
     
    Posted Feb 3, 2012
    #1
  2. Code:
    using System;
    // A "Hello World!" program in C#
    namespace HelloWorld
    {
        class Hello 
        {
            static void Main() 
            {
                System.Console.WriteLine("Hello World!");
            }
        }
    }
    
    That's all I know. >.<
     
    Posted Feb 3, 2012
    #2
  3. Enkari!

    Enkari!

    70
    13
    4
    Is... is that a template? :L

    This is all I can do so far:

    Code:
    using System;
    using System.Threading;
    
    namespace lolrandomname
    {
    	class Program
    	{
    		public static void Main(string[] args)
    		{
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Title = "Lee's shitty bot";
    			string name;
    			
    			Console.WriteLine("Hello there!");
                Thread.Sleep(1500);
    			Console.WriteLine("Mind telling me what your name is?");
                Console.ForegroundColor = ConsoleColor.White;
                Thread.Sleep(1500);
    			name = Console.ReadLine();
                Console.ForegroundColor = ConsoleColor.Green;
                if (name.Contains("Jack"))
                {
                    Console.WriteLine("Oh... I heard you're a bit of a Hentai fan?");
                }
                else if (name.Contains("raig"))
                {
                    Console.WriteLine("Hey cunty flap ;)");
                }
                else if (name.Contains("arry"))
                {
                    Console.WriteLine("Oi you ginger prick, piss off mate.");
                }
                else if (name.Contains("arry"))
                {
                    Console.WriteLine("SUP BRO");
                }
                else if (name.Contains("Lee"))
                {
                    Console.WriteLine("HEY BABE");
                }
                else if (name.Equals(""))
                {
                    Console.WriteLine("Would be a good idea if you typed your name -.-");
                }
                else
                {
                    Console.Write("Hey there, " + name);
                    Console.WriteLine("!");
                }
                Console.ReadLine();
    		}
    	}
    }
    
     
    Posted Feb 3, 2012
    #3
Thread Status:
Not open for further replies.