Check out example codes for "startup object visual studio c# not showing up". It will help you in understanding the concepts better.

Code Example 1

/*If the class that you want is not showing up in the drop down,
you can double click on the project in the Solution Explorer and 
add the class name after the project name.
(shown in code as "myproject" and "myclass")*/

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<StartupObject>myproject.myclass</StartupObject>
</PropertyGroup>

</Project>

Learn ReactJs, React Native from akashmittal.com