Today I started organizing my code in separate .cs files, and so that the methods that work with the user interface continue to do this, I would create .cs code under the same namespace and open partial class name so that the methods can be compatible.
My header looks like this in four files, including the main file, which calls:
public shell() { InitializeComponent(); }
The header area of ββthe .cs files that work with the user interface (and seem to cause this new conflict):
using System; using System.Windows.Forms; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.IO; using System.Data.SqlServerCe; using System.Diagnostics; using System.Threading; using System.Collections.Specialized; using System.Net; using System.Runtime.InteropServices; using watin = WatiN.Core; using WatiN.Core.Native.InternetExplorer; using System.Web; namespace WindowsFormsApplication1 { public partial class shell : Form {
Now when I try to debug / view my application (by the way, this is a Windows application in Visual Studio 2010 Express), I get the following error message:
Does not contain static main method suitable for entry point
I looked in the application properties in Application-> Startup object, but it does not offer me any options. How can I tell the application to start with a .cs file that has my InitializeComponent (); team?
- I have looked around so far without a solution.
- The properties of each .cs file are set to Compile.
- I do not see the App.xaml file in my solution explorer, but I see the app.config file.
I'm still very new, and this is my first attempt to organize a method using C # code.
c # visual-studio-2010
atwellpub Mar 07 '12 at 19:20 2012-03-07 19:20
source share