//----< entry point >--------------------------------------------

        static void Main(string[] args)
        {
            Console.Write("\n  Demonstrating Type Relationships");
            Console.Write("\n ==================================\n");

            DemoRelationships p = new DemoRelationships();

            p.at.say();
            p.dt.say();
            UsedType ut = new UsedType("holding this string");

            p.say(ut);
            Console.Write("\n\n");
        }
예제 #2
0
    //----< entry point >--------------------------------------------

    static void Main(string[] args)
    {
      Console.Write("\n  Demonstrating Type Relationships");
      Console.Write("\n ==================================\n");

      DemoRelationships p = new DemoRelationships();
      p.at.say();
      p.dt.say();
      UsedType ut = new UsedType("holding this string");
      p.say(ut);
      Console.Write("\n\n");
    }
예제 #3
0
 /*----< this function is here because static Main >------------
   ----< can't directly access nonstatic data ct   >------------*/
 
 public void say(UsedType ut)
 {
   ct.say();
   ut.say();
 }
        /*----< this function is here because static Main >------------
        *  ----< can't directly access nonstatic data ct   >------------*/

        public void say(UsedType ut)
        {
            ct.say();
            ut.say();
        }
예제 #5
0
        //----< entry point >--------------------------------------------
        static void Main(string[] args)
        {
            Console.Write("\n  Demonstrating Type Relationships");
            Console.Write("\n ==================================\n");

            DemoRelationships p = new DemoRelationships();
            p.at.say();
            p.dt.say();

            ComposedType ct = new ComposedType();
            ct.d = 1;

            UsedType ut = new UsedType("holding this string");
            p.say(ut);
            Console.Write("\n\n");
              int x = 0;

              do
              x++;
              while (x < 5);
        }