Does anyone know of any examples or code that shows a class or struct that can be used for distance like the DateTime struct? I need to be able to add, subtract, and display the data in feet and inches and using conversion methods just gets messy. A class or struct would be perfect, but I came across nothing in my searches.
Share
Use a struct, but make it immutable (all properties are get-only).
Properties should include at least:
Methods should include at least:
Declare the private backing field as:
Edit: Maybe something like this.