Convert the Calc app to use .Net Remoting
Download the Types Warm-up Exercise
- Extract to a location on your local hard drive.
- The instructor will provide you with the password.
The purpose of this exercise is to highlight
the features offered by reference types (classes) which are lacking in value
types (structs), and also to show how they have difference copy semantics.
1. In Main take a look at the line of
code.
- What exactly gets copied with reference types?
- What gets copied if IceCream were a value type?
IceCream ic2 = ic1;
2. Change the Flavor or ic2 to something else (like Vanilla).
- What is now the Flavor or ic1?
3. Change the IceCream class (reference type) to a struct (value type).
4. Build the solution.
- What compile errors are there?
- Fix each compile error by changing or commenting out the code.
- What features did you lose?
5. Repeat step 2.
- How is the result different?