public custom_a(custom_b atrib_b, custom_c atrib_c, custom_j atrib_j) { this.atrib_b = atrib_b; this.atrib_c = atrib_c; this.atrib_j = atrib_j; atrib_c.cq = 24; }
static void Main(string[] args) { custom_d c_d = new custom_d(); custom_e c_e = new custom_e(); custom_f c_f = new custom_f(); custom_k c_k = new custom_k(); custom_j c_j = new custom_j(); custom_b c_b = new custom_b(c_d); custom_c c_c = new custom_c(c_e, c_f, c_k); custom_a c_a = new custom_a(c_b, c_c, c_j); Console.WriteLine("access atribute: {0}", c_c.cq); Console.WriteLine("link aggregation"); c_a.set_get_atrib_b.b_method(); c_a.set_get_atrib_c.c_method(); c_a.set_get_atrib_j.j_method(); c_a.set_get_atrib_b.set_get_atrib_d.d_method(); c_a.set_get_atrib_c.set_get_atrib_e.e_method(); c_a.set_get_atrib_c.set_get_atrib_f.f_method(); c_a.set_get_atrib_c.set_get_atrib_k.k_method(); }