locked
Starting execution not what's expected RRS feed

  • Question

  • Ignore my question, I finally came up with the answer

    Just a beginner, so bear with me. With a simple project the form processing is normal. When I add a Class to the project the execution begins in the Class program and no matter what I try the problem remains. Hopefully a known solution.

    The project start up declares Main as the starting program. 


    Thanks John
    • Edited by Johnwalla Tuesday, February 13, 2018 3:06 PM
    Monday, February 12, 2018 3:25 PM

All replies

  • You say "when I add a class", but then say "execution begins in the Class program".

    When you add a class you are generally adding a single file to your existing project containing a class definition such as:

    using System;
    // more using statements
    
    namespace MyDefaultNamespace
    {
       public class MyClass
       {
           // add stuff here
       }
    }

    Is this what you are getting when you add a class?

    When you say execution begins in the class program, what you do mean by this? A class, on its own, does not contain executable code until you actually add methods to it. So do you mean that execution is starting in one of the class methods?

    It may help if you say exactly what menu items and options you are selecting in Visual Studio when you do this.

    Monday, February 12, 2018 3:44 PM
  • You don't tell us the language; you need to specify the language, whether C# or VB, at least. You also don't tell us what type of project; is it a console program or a Windows Forms project or something else? You don't tell us how you add the class. You don't tell us if the project executed properly before adding the class.

    Please provide more information.



    Sam Hobbs
    SimpleSamples.Info

    Monday, February 12, 2018 6:06 PM