| ||Data Access, Properties, and Methods - slide 23 : 29|
Passing structs as value parameters
There are no surprises when we pass struct values as value parameters
The struct Date and the method DayDifference with a value parameter.
The class Person which calls DayDifference on dateOfBirth.
A client of Person and Date which reveal the consequences.
Client program output.
Passing struct values as ref parameters
There is a good fit between use of value types and call-by-value parameter passing