Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Range Sugar" issue... #79

Open
DualBrain opened this issue Nov 10, 2021 · 1 comment
Open

"Range Sugar" issue... #79

DualBrain opened this issue Nov 10, 2021 · 1 comment

Comments

@DualBrain
Copy link

Was working my way through some samples located at https://blog.ndepend.com/top-10-new-net-6-0-api/

The LINQ now works with Index and Range operators...

// 6 element indexed from 0 to 5
var arr = new [] {0, 1, 2, 3, 4, 5};
Assert.IsTrue(arr.ElementAt(^2) == 4); // Take the second element from the end

This fails to convert... will have to think how to handle translating to VB. My initial reaction is that the ^2 basically translates to the length of the variable containing the elements minus the value, so something like:

AssertIsTrue(arr.ElementAt(arr.Length - 2) = 4)

May also have to look at the ^2...2 version as well.

@paul1956
Copy link
Owner

@DualBrain I think I only partly support that feature. I will look at it or you can if you want something simple to work on. Just fork the repo and create a branch for this. also if you want to finish Dark Mode, that should be a separate branch.

paul1956 added a commit that referenced this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants