Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4077

Support Range (..) operator

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Unknown Unknown
    • None
    • None
    • LINQ3
    • None

    Description

      C#8 introduced support for ranges using ... For example:

      var middle = array[1..^1];
      

      The array bounds can also be computed:

      var moreMiddle = array[start..(start+numItems)];
      

      We would have to support new overloads for collection methods that take Range parameters.

      More details on the syntax can be found here:

      https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#range-operator-

      Attachments

        Activity

          People

            james.kovacs@mongodb.com James Kovacs
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: