Programmer's Corner Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programmer's Corner - Forums


Hello World - VB.NET and C#

 
Post new topic   Reply to topic    Programmer's Corner Forum Index -> C# and VB.NET Reference
Author Message
Hrqls
De Blonde Puffin


Joined: 22 Oct 2004
Posts: 558
Location: Alkmaar, The Netherlands

PostPosted: Wed Jun 18, 2003 7:36 am    Post subject: Hello World - VB.NET and C# Reply with quote

can anyone please post the most simple Hello World code in vb.net as well as in c# ?

The specialty of the house ? thats me (cheap as always)

For your questions about Visual Basic pay a visit to : Visual Basic Explorer
When you want to have some more fun come to : The Programmers Corner

Edited by: BeadyEye at: 6/26/03 2:04 pm
Back to top
Eric
Idea Hamster


Joined: 21 Oct 2004
Posts: 679
Location: Bangor, Maine

PostPosted: Wed Jun 18, 2003 8:36 am    Post subject: Re: Hello World Reply with quote

I got a "Hello World" sample on my website in C#. Nothing in VB.Net yet though.



Eric D. Burdo, RLI Solutions


Erix World of Programming - Tutorials, Source Code, Articles and Tips on programming in VB, VB.Net, C#, PHP and C/C++
the drop ship guide - The complete guide on to how to get started with wholesale drop shipping.

Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Wed Jun 18, 2003 8:53 am    Post subject: Re: Hello World Reply with quote

Create a console App:
  ' project created on 6/18/2003 at 9:48 AMImports SystemModule Main    Sub Main()        Console.WriteLine("Hello World!")     End SubEnd Module



Programmer's Corner - .NET, Web Development, SQL, C++, and more.

Edited by: BeadyEye at: 6/18/03 9:53 am
Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Wed Jun 18, 2003 9:04 am    Post subject: Re: Hello World Reply with quote

Or as a form:
 ' created on 6/18/2003 at 10:07 AMImports SystemImports System.Windows.FormsModule Main        Sub Main                Dim fMainForm As New MainForm                fMainForm.ShowDialog()        End Sub                Public Class MainForm                Inherits System.Windows.Forms.Form                   Public Sub New                      MyBase.New()                        Me.Text = "This is my form"                        MsgBox("Hello World")                End Sub                        End Class        End Module


Programmer's Corner - .NET, Web Development, SQL, C++, and more.

Back to top
ModusPonens
if A then B, if B then C...


Joined: 22 Oct 2004
Posts: 363
Location: Baltimore

PostPosted: Wed Jun 18, 2003 10:42 am    Post subject: Re: Hello World Reply with quote

OK, I'm curious if this will work. I wrote this in SharpDevelop and I'm wondering how it would work in .Net. It doesn't look much like the samples above.
  //My first C# program created on 6/12/2003 at 7:01 PMnamespace HelloWorld{        using System;                public class Class1        {                //Start of program                //public Class1()                //{                                        //}                public static int Main(string[] args)                                {                        //prompt for name                        Console.WriteLine("Enter your name:") ;                                                //read the entered name                        string sName = Console.ReadLine();                                                //greet user with an annoying message                        Console.WriteLine("Hello " +sName +", it feels weird making a program this simplistic!") ;                        Console.WriteLine("But this SharpDevelop program isn't too bad for a free program.") ;                        //wait for user to acknowledge                        Console.WriteLine("Hit Enter to terminate...") ;                        Console.Read();                                                return 0;                }        }}

Edited by: BeadyEye at: 6/18/03 11:57 am
Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Wed Jun 18, 2003 11:01 am    Post subject: Re: Hello World Reply with quote

I just tried it for you and it compiled as is. :)

The reason it doesn't look like the other ones is that they are in VB.NET. Oh, and they were made in sharpdevelop too. ;)

I'm using sharpdevelop at work because they are to cheap to buy VS.NET, and using VS.NET at home. Should make for an interesting combination.


Programmer's Corner - .NET, Web Development, SQL, C++, and more.

Back to top
ModusPonens
if A then B, if B then C...


Joined: 22 Oct 2004
Posts: 363
Location: Baltimore

PostPosted: Wed Jun 18, 2003 11:36 am    Post subject: Re: Hello World Reply with quote

Oh good, I didn't want to think I was wasting my time with SharpDevelop. I see you edited my post, I guess I forgot to turn off the emoticons again, doh!

Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Wed Jun 18, 2003 11:38 am    Post subject: Re: Hello World Reply with quote

I only knew to turn them off because I made the same mistake on mine and had all kinds of ;) all over it.


Programmer's Corner - .NET, Web Development, SQL, C++, and more.

Back to top
Hrqls
De Blonde Puffin


Joined: 22 Oct 2004
Posts: 558
Location: Alkmaar, The Netherlands

PostPosted: Tue May 02, 2006 12:20 am    Post subject: Re: Hello World Reply with quote

Eric wrote:
I got a "Hello World" sample on my website in C#. Nothing in VB.Net yet though. <p><BR><BR><B>Eric D. Burdo, <A HREF="http://www.rlisolutions.com" TARGET="_BLANK">RLI Solutions</A></B><BR><BR><HR><FONT SIZE="2"><A HREF="http://www.erix-world.com" TARGET="_BLANK">Erix World of Programming</A> - Tutorials, Source Code, Articles and Tips on programming in VB, VB.Net, C#, PHP and C/C++<BR><A HREF="http://www.thedropshipguide.com" TARGET="_blank">the drop ship guide</A> - The complete guide on to how to get started with wholesale drop shipping.</FONT><HR></p><i></i>


i guess your tutorials and sample codes would be on http://www.erix-world.com/
but that site isnt there anymore (although i can buy it Wink)
do you still have the contents online somewhere else ?
Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Fri May 05, 2006 9:22 am    Post subject: Reply with quote

All the Erix-World content was merged into the Programmer's Corner library.

http://msdn.microsoft.com/vstudio/express/visualcsharp/learning/default.aspx

Might want to watch some of these videos.

http://msdn.microsoft.com/vcsharp/

And bookmark this page for tons of info.

I can't be much more help after that in C#. If you had went VB.NET it would be a different story.
Back to top
Hrqls
De Blonde Puffin


Joined: 22 Oct 2004
Posts: 558
Location: Alkmaar, The Netherlands

PostPosted: Fri May 05, 2006 12:55 pm    Post subject: Reply with quote

thanks Smile

i got my book on C# yesterday .. its quite nice Smile
(sams 24 C# in 24 hours)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Programmer's Corner Forum Index -> C# and VB.NET Reference All times are GMT - 5 Hours
Page 1 of 1

 


Powered by phpBB © 2001, 2002 phpBB Group