How to allow the use of list slice pattern in online editor

With the current featured exercise ‘List Ops’ that encourages recursion I thought it would be handy to use the slice pattern:

Recursive(someVariable, list[1…]);

But I can’t figure out how to get it to work in the online editor. I’m getting a CS1503 error when I try.

Argument 1: cannot convert from 'System.Range' to 'int'

I see a topic further down the list that shows .NET 7 is implemented so that should take care of the Range shorthand […] (C# 8) and the improved patterns in C# 11, right?

I have no issues in VS Code which usually means I forgot one of the standard using statements but System.Collections.Generic is there and I think the rest of the logic is covered in System.

What am I missing?

(Edit: I only used double dots everywhere, that’s not the issue. That’s an auto-correct on the forum, apparently)

Could you link to your full solution?

Heh, you’re very quick!

I just rushed through the exercise to finish it but you should be able to get the gist of it.
List Ops in C# Octanoz

Turns out we were still running .NET 7. I’ve just upgraded to .NET 8 (see Support for .NET 8 by ErikSchierboom · Pull Request #215 · exercism/csharp-test-runner · GitHub) which should fix the issue.

Ah, very nice!
Can confirm this works now.

Thanks, Erik!

2 Likes