440-903-1083

GogoGeeks Posts

Our First Program in C# – Hello World

Hey everybody,

Let’s write our first program in C# (C Sharp).

Open Visual Studio ( you can download the Free version Visual Studio Community 2015 from Here )

Go to File > New > Project and from that window choose Console Application.

In Name be sure to rename the default “ConsoleApplication1” to the name of your program – for example “HelloWorld” (without the quotes). It’s Not good to stay the default name .. when you start building more projects you’ll have big problems finding what you’re looking for, that’s why it’s recommended you change the name to as much as close for what’s about the program.

Hit OK and Visual Studio creates a new project.

It should look something like this:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}

 

So we want to write a program which writes “Hello World” in the console.

Between the brackets here:

static void Main(string[] args)
        {
        }

We write:


Console.WriteLine("Hello World");

The code of this program should look like this now:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World");
        }
    }
}



Now hit Ctrl + F5 to run it, and you’ll see black window displaying our greeting to the world (as below).

(908) 664-6617

friendfinder

FriendFinder Network of sites is hacked. So if you have account on AdultFriendFinder, FriendFInder.com, Cams.com, Penthouse, Stripshow or iCams.com – and you reused in on some other sites – you should change the passwords immediately. According to Leaked Source over 412 millions accounts have been compromised. They were hacked via a Local File Inclusion exploit and you can read more about it Here.