Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Container of the "real" data
- struct FooInternal
- {
- public int Foo1;
- public int Foo2;
- public List<int> Foos;
- }
- class Foo
- {
- private FooInternal FooInternal;
- public Foo()
- {
- this.FooInternal.Foos = new List<int>();
- }
- public Foo(Foo other)
- {
- // "clone" operation
- this.FooInternal = other.FooInternal;
- }
- /* Proxies */
- public int Foo1
- {
- get
- {
- return this.FooInternal.Foo1;
- }
- set
- {
- this.FooInternal.Foo1 = value;
- }
- }
- public int Foo2
- {
- get
- {
- return this.FooInternal.Foo2;
- }
- set
- {
- this.FooInternal.Foo2 = value;
- }
- }
- public List<int> Foos
- {
- get
- {
- return this.FooInternal.Foos;
- }
- set
- {
- this.FooInternal.Foos = value;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement