none
What is the StartObject for? RRS feed

Answers

  • By default this is program.cs, if you want to change it this is where it's done.

    See the following https://csharp.2000things.com/tag/startup-object/


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Monday, August 6, 2018 3:52 PM
    Moderator
  • Hi,

    Mostly you have only one class in your program & that class contains a method Main() which acts as a entry point for your application. Entry point I mean its first method which will execute when you start your application

    Practically, you can have more than one class which has Main method in it - in this case, you need to tell compiler which class's Main method should be your entry point and You can make that change in Startup Object setting in properties.

    Hope this clears.


    Thanks,
    Vivek Bansod
    Blog | MSDN | LinkedIn
     

    • Marked as answer by E-John Tuesday, August 7, 2018 9:29 AM
    Tuesday, August 7, 2018 7:29 AM
  • Hi E-John,

    We could have many classes in one project. And each class could have a Main method. We could set the class which run in Startup Object when you click Start in Visual Studio. 

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by E-John Tuesday, August 7, 2018 9:30 AM
    Tuesday, August 7, 2018 7:52 AM
    Moderator

All replies

  • By default this is program.cs, if you want to change it this is where it's done.

    See the following https://csharp.2000things.com/tag/startup-object/


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Monday, August 6, 2018 3:52 PM
    Moderator
  • Hi,

    Mostly you have only one class in your program & that class contains a method Main() which acts as a entry point for your application. Entry point I mean its first method which will execute when you start your application

    Practically, you can have more than one class which has Main method in it - in this case, you need to tell compiler which class's Main method should be your entry point and You can make that change in Startup Object setting in properties.

    Hope this clears.


    Thanks,
    Vivek Bansod
    Blog | MSDN | LinkedIn
     

    • Marked as answer by E-John Tuesday, August 7, 2018 9:29 AM
    Tuesday, August 7, 2018 7:29 AM
  • Hi E-John,

    We could have many classes in one project. And each class could have a Main method. We could set the class which run in Startup Object when you click Start in Visual Studio. 

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by E-John Tuesday, August 7, 2018 9:30 AM
    Tuesday, August 7, 2018 7:52 AM
    Moderator
  • Hi Vivek,

    Understood, thanks for your explanations.

    Best regards,

    E-John

    Tuesday, August 7, 2018 9:29 AM
  • Hi Wendy,

    Understood, thanks for your explanations.

    Best regards,

    E-John

    Tuesday, August 7, 2018 9:30 AM