包含类型
1using System;
2using System.Data;
3using System.Configuration;
4using System.Collections;
5using System.Web;
6using System.Web.Security;
7using System.Web.UI;
8using System.Web.UI.WebControls;
9using System.Web.UI.WebControls.WebParts;
10using System.Web.UI.HtmlControls;
11
12public 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
2using System.Data;
3using System.Configuration;
4using System.Collections;
5using System.Web;
6using System.Web.Security;
7using System.Web.UI;
8using System.Web.UI.WebControls;
9using System.Web.UI.WebControls.WebParts;
10using System.Web.UI.HtmlControls;
11
12public 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