TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
D Dasawari
NA
138
25.1k
I m new to c# and facing problem in own custom namespace .
May 8 2015 6:48 AM
Hi,
I am new to C# and I made own custom namespace lets say "namespace1" and referred in another namespace lets say "namespace2". When i run them , error comes like:
"Error 1 Program 'c:\c#_projects\namespace1\namespace1\obj\Debug\namespace1.exe' does not contain a static 'Main' method suitable for an entry point C:\c#_projects\namespace1\namespace1\CSC namespace1" .
Please rectify it.
Source Codes are given below:
1. namespace1 :
using System;
namespace namepspace1
{
class n1
{
public void Hello()
{
Console.WriteLine("Hello, C# World!");
}
}
}
2. namespace2 :
using System;
using namespace1;
namespace namespace2
{
class n2
{
static void Main()
{
n1 cls = new n1();
cls.Hello();
}
}
}
Reply
Answers (
1
)
how to play local drive mp3 song in c# asp.net
how to stop change of objects in collection using c#.