Thread: how to create a namespace in vb 2008 .net3.5

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    13

    how to create a namespace in vb 2008 .net3.5

    i want to create a namespace but after compiling it shows the following error

    Error 1 Program 'D:\Visual Studio 2008\Projects\namespace1\namespace1\obj\Debug\name space1.exe' does not contain a static 'Main' method suitable for an entry point namespace1


    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    
    namespace mynamespace
    {
        public class program
        {
            public static void display()
            {
                Console.WriteLine("From mynamespace.test-----hello world");
            }
        }
    }

  2. #2
    spaghetticode
    Guest
    I don't know any of those .NET languages, but the error message ist pretty straight forward. Have you actually read it? It says literally what your problem is.

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    13
    sorry frnds...i got my mistake......i had to select the class library template instead of consoleapplication template in new project window...it works fine now!!!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Friend of namespace or of namespace function?
    By Programmer_P in forum C++ Programming
    Replies: 18
    Last Post: 03-13-2011, 06:46 PM
  2. create and populate create bidimensional array
    By darkducke in forum C Programming
    Replies: 0
    Last Post: 12-03-2010, 07:06 AM
  3. Replies: 0
    Last Post: 10-18-2009, 02:33 AM
  4. WinHEC 2008
    By brewbuck in forum Tech Board
    Replies: 3
    Last Post: 11-08-2008, 04:17 PM
  5. Who do you think....(2008)
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 63
    Last Post: 11-10-2004, 11:53 PM