C# code simple console program not working

Posted by Wast334 on Stack Overflow See other posts from Stack Overflow or by Wast334
Published on 2010-05-05T06:48:12Z Indexed on 2010/05/05 6:58 UTC
Read the original article Hit count: 186

Filed under:
|

I am trying to test some console ability in C#.. I can't get this code to work

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Dim myMessage;
            myMessage = @"Hello World";
            printf(@"%@", myMessage);
            return 0;
        }
    }
}

I am getting a bunch of compiler errors i am not sure what I am doing wrong..?

Error   1   The type or namespace name 'Dim' could not be found (are you missing a using directive or an assembly reference?)   C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    12  13  ConsoleApplication1
Error   2   The name 'printf' does not exist in the current context C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    14  13  ConsoleApplication1
Error   3   Since 'ConsoleApplication1.Program.Main(string[])' returns void, a return keyword must not be followed by an object expression  C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    15  13  ConsoleApplication1

© Stack Overflow or respective owner

Related posts about c#

Related posts about console