Practice · 4 of 4
Value vs reference: the batch
CHALLENGE
Difficulty: beginner+25 XP
Implement in Solution: struct Batch { public int Count; } and static (int First, int Second) CopyProbe() that creates a Batch with Count = 1, copies it to a second variable, sets the copy's Count = 2, and returns BOTH counts. Also static (int First, int Second) RefProbe() doing the same with class BatchRef { public int Count; }.
Press Submit to check your solution.
Back to lesson: Practice: Data modeling workout