I get an error saying "Missing partial modifier on declaration of type 'projectName.Main'; another partial declaration of this type exists. From what i can read about this error, its because i have classes with same name. It does work if i modify the main class to public partial class Main : Form but i want to know why it gives me this error. I need to initializeComponent within Main(), tried creating a method start() and then calling main.Start() in a load event, but then the form loads blank.
namespace projectName
{
public class Main : Form
{
public Main() // Method: Starts the main form
{
InitializeComponent();
}
public void Main_Load(object sender, EventArgs e)
// On load of main class, handle events and arguments
{
Main main = new Main();
main.getCurrentDomain();
}
public void getCurrentDomain() // Method: Get current domain
{
Domain domain = Domain.GetCurrentDomain();
}
} // Ends the main class
}