<p>Consider the following code:</p>

<pre><code>abstract class SomeClassX&lt;T&gt;
{
  // blah
}

class SomeClassY: SomeClassX&lt;int&gt;
{
  // blah
}

class SomeClassZ: SomeClassX&lt;long&gt;
{
  // blah
}
</code></pre>

<p>I want a collection of SomeClassX&lt;T&gt;'s, however, this isn't possible since SomeClassX&lt;int&gt; != SomeClassX&lt;long&gt; and List&lt;SomeClassX&lt;&gt;&gt; isn't allowed.</p>

<p>So my solution is to have SomeClassX&lt;T&gt; implement an interface and define my collection as, where ISomeClassX is the interface:</p>

<pre><code>class CollectionOfSomeClassX: List&lt;ISomeClassX&gt;
{
  // blah
}
</code></pre>

<p>Is this the best way to do this, or is there better way?</p>

Divide the number by 2.5, round up to the nearest integer, then multiply the result by 2.5.
You're close.
```
```
Function RoundToIncrement(ByVal orignialNumber As Decimal, ByVal increment As Decimal) As Decimal
    Return Math.Ceiling( orignialNumber / increment ) * increment
End Function
```
```
Math.Ceiling will always round non-integers up, so you don't need the post-adjustment.