title: Equivalents in C Sharp of Java's NavigableMap.floorEntry, ceilingEntry
body: <p>I have used the <code>NavigableMap</code> interface many a time in Java, it's handy.</p>
  
  <p>Specifically, I like to use its <code>floorEntry</code> and <code>ceilingEntry</code> methods, which get you the next lowest or highest map entry, respectively. </p>
  
  <p>I am trying to find the equivalents of these in C# but I am coming up short. Below is an example of what I am trying to get.</p>
  
  <p>I've looked at C# <code>SortedDictionary</code> and extension methods, and, while it seems like it'd be in the ballpark, I haven't found exactly what I'm looking for.</p>
  
  <p>Thanks!
  L</p>
  
  <pre><code>package com.lewis.needsanavigablemapincsharp;
  
  import java.util.NavigableMap;
  import java.util.TreeMap;
  
  public class Main {
  
      public static void main(String[] args) {
  
          NavigableMap&lt;Float, String&gt; neededMap = new TreeMap&lt;Float, String&gt;();
  
          neededMap.put(1.0f, "first!");
          neededMap.put(3.0f, "second!");
  
          System.out.println("see how useful this is? (looking up indices that aren't in my map)");
          System.out.println(neededMap.floorEntry(2.0f));
          System.out.println(neededMap.ceilingEntry(2.0f));
  
      }
  }
  </code></pre>
  
  <p>the output is:</p>
  
  <blockquote>
    <p>see how useful this is? (looking up indices that aren't in my map)<br/>
    1.0=first!<br/>
    3.0=second!</p>
  </blockquote>