Going through my code, I was hoping to remove instances where I do this:
Height = new Unit(doubleValue);
where Height was representing a value in pixels.
I didn't like having to say new everywhere, it felt like I should be able to just modify height's value, but it is read-only.
As such, I stumbled upon Unit.Pixel() and Unit.Percentage(). The percentage method takes a double, but the pixel method only handles integers.
Is there some big reason behind this, an oversight, or a misunderstanding on my part?
Is it standard to create a new unit every time I wish to change height's value?
EDIT: For reference,