Creating the Main Program File

Create the Program.cs file, which is the main entry point for the application.

  1. In the Solution Explorer, right-click SUP101, then select Add > New Item.
  2. In Categories, select Code and in Templates, select Code File.
  3. Name the code file Program.cs, then click Add.
  4. Right-click Program.cs, then select View Code.
  5. Replace the existing code with the code from the Program.cs file you downloaded from the Sybase Product Documentation Web site:
    using System;
    using SUP101;
    using System.Windows.Forms;
    
    namespace SUP101
    {
        static class Program
        {
            /// <summary>
            /// The main entry point for the application.
            /// </summary>private static Customers _form1 = new Form1();
            private static Customers _form1 = new Customers();
            private static Customer_Details _form2 = new Customer_Details();
            private static string _custid;
            public static string getCustomer()
            {
                return _custid;
            }
            public static void setCustomer(string custid)
            {
                _custid = custid;
            }
            public static Customers getForm1()
            {
                return _form1;
            }
            public static Customer_Details getForm2()
            {
                return _form2;
            }
            static void Main(string[] args)
            {
                Application.Run(_form1);
            }
        }
    }
  6. Save your changes.
  7. Build the project by pressing Control+Shift+B.