Why does Unit.Pixel() only take an integer parameter, but new Unit() has a default return type of Pixel and handles doubles?
<p>Going through my code, I was hoping to remove instances where I do this:</p>

<pre><code>Height = new Unit(doubleValue);
</code></pre>

<p>where Height was representing a value in pixels.</p>

<p>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.</p>

<p>As such, I stumbled upon Unit.Pixel() and Unit.Percentage(). The percentage method takes a double, but the pixel method only handles integers.</p>

<p>Is there some big reason behind this, an oversight, or a misunderstanding on my part?</p>

<p>Is it standard to create a new unit every time I wish to change height's value?</p>

<p>EDIT: For reference,</p>

<p><a href="http://msdn.microsoft.com/en-us/library/yyk4f9a5.aspx" rel="nofollow">Unit Constructor</a></p>

<p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.unit.pixel.aspx" rel="nofollow">Pixel Method</a></p>
