-
New to C#
Hello all,
I'm starting to pick up C#. I come from a java background so a lot of things look familiar but a few things don't. I'm starting a simple Hello World program using Visual Studio. Here's what I have combined with what VS gave me:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadLine();
}
}
}
Everything makes sense except for the namespace ConsoleApplication1 part. Do I need that? Can I just have it say "public class Program" like I would in java?
Also, does anyone know if there's a good C# plug-in for Eclipse?
Thanks
-
It can be as simple as this:
Code:
using System;
class Program
{
static void Main()
{
Console.WriteLine("blah");
Console.ReadKey();
}
}
Obviously, when you start making indepth programs spanning over many classes, you'll appreciate the ability to use NameSpaces. They are a god-send for larger projects!
-
a namespace is comparable to a package in java.
-
Hey thanks, that's quite helpful. I found a page on C# for Java programmers which was also helpful: C# From a Java Developer's Perspective.
Still looking for a good C# plugin for eclipse
-
Why not use microsoft C#? It's free.
Visual C# 2008 Express Edition
-
Thanks I'll look into that. I found a good tutorial on C# that I'm going through now. It seems very similar to Java which is very helpful. I've also read that you can use C# with ASP.NET. I don't really know what ASP.NET is except that it's for web development. I don't know much about web development but I'd really like to. Maybe after I learn a bit more C# I can learn what ASP.NET is and how to use it with C#. Does anyone know any good resources for ASP.NET+C#?
-