Either you can write your own algorithm or if you are using .Net 3.5 and above use HasSet.
Once you have your values in list, use following code
HashSet<int> uniqueNumbers = new HashSet<int>(list);</int></int>
This will give a HashSet with unique number, in your case list of 5 values only.