包含类型

 1 using  System;
 2 using  System.Data;
 3 using  System.Configuration;
 4 using  System.Collections;
 5 using  System.Web;
 6 using  System.Web.Security;
 7 using  System.Web.UI;
 8 using  System.Web.UI.WebControls;
 9 using  System.Web.UI.WebControls.WebParts;
10 using  System.Web.UI.HtmlControls;
11
12 public  partial  class  包含类型 : System.Web.UI.Page
13 {
14    public class aaa
15    {
16        private string val1l;
17        public aaa(string str)
18        {
19            val1l = str;
20        }

21        public string Val1
22        {
23            get
24            {
25                return val1l;
26            }

27            set
28            {
29                val1l = value;
30            }

31        }

32    }

33    public class bbb
34    {
35        private aaa bval1;
36        public bbb()
37        {
38
39        }

40        public aaa Bval1
41        {
42            get
43            {
44                return bval1;
45            }

46            set
47            {
48                bval1 = value;
49            }

50        }

51    }

52
53    protected void Page_Load(object sender, EventArgs e)
54    {
55        bbb bb = new bbb();
56        bb.Bval1 = new aaa("fdasfas");
57        Response.Write(bb.Bval1.Val1);
58    }

59}

60

你可能感兴趣的:(类型)