<p>I have a decimal number (let's call it <strong>goal</strong>) and an array of other decimal numbers (let's call the array <strong>elements</strong>) and I need to find all the combinations of numbers from <strong>elements</strong> which sum to goal.</p>

<p>I have a preference for a solution in C# (.Net 2.0) but may the best algorithm win irrespective.</p>

<p>Your method signature might look something like:</p>

<pre><code>public decimal[][] Solve(decimal goal, decimal[] elements)
</code></pre>

I think you've got a
bin packing problem
on your hands (which is NP-hard), so I think the only solution is going to be to try every possible combination until you find one that works.
Edit: As pointed out in a comment, you won't
always
have to try
every
combination for
every
set of numbers you come across. However, any method you come up with has worst-case-scenario sets of numbers where you
will
have to try
every
combination -- or at least a subset of combinations that grows exponentially with the size of the set.
Otherwise, it wouldn't be NP-hard.