C# Code Optimization -- Finding nearest key in a SortedList
Your loop is pretty well written. The only thing that sticks out to me is your use of a constant in the while loop and manually breaking.  I also prefer to use a slightly different version of CompareTo, but it doesn't make much difference:

while ( (lower&lt;=upper))
{
    int comparisonResult = thisValue.CompareTo( thisList.Keys [index]);
    if (comparisonResult == 0) { return thisList.Values[index]; }

    if (comparisonResult &lt; 0)
    {
        upper = index - 1;
    }
    else
    {
        lower = index + 1;
    } 
    index = (lower + upper) / 2; 
}


You might also be looking for a solution that's just easier to read or shorter. Are you familiar with LINQ? This is one possibility for how your function might look.

    private static string GetTraitRefactor (SortedList&lt;decimal, string&gt; thisList, decimal thisValue)
    {
        var keys = thisList.Keys;
        var nearest = thisValue -
            keys.Where(k =&gt; k &lt;= thisValue)
            .Min(k =&gt; thisValue - k);
        return thisList[nearest];
    }