So shortly after going through writing my question I looked on MSDN and found an article on generics which I had been through already however halfway down the page I found the answer that I was looking for. Here is the code for the solution:
private string[] getTopWords<T , U>(Dictionary<T, U> similarWordsAndWeights) where U : IComparable
{
var myList = similarWordsAndWeights.ToList();
myList.Sort((firstPair, nextPair) =>
{
return -firstPair.Value.CompareTo(nextPair.Value);
}
);
var dictionary = myList.ToDictionary((keyItem) => keyItem.Key, (valueItem) => valueItem.Value);
return createStringArrayFromGenericList(dictionary.Keys.ToList().GetRange(0, NUMBER_OF_WORDS_TO_RETURN));
}
It appears that you do the bounding declaration AFTER the parameters. I was looking for something before (having a Java background) and of course was not able to find anything. Amazing what one can do on google with just a few extra minutes...
I thought it wise to share my solution as I was not able to find anything specifically on SO and it may be helpful to others that end up searching for the same thing.