We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在小标题选取从结尾位置开始的一段范围中,文档代码如下
int[] numbers = new[] { 0, 10, 20, 30, 40, 50 }; int amountToTakeFromEnd = 3; int[] subset = numbers[^amountToTakeFromEnd..]; Display(subset); // output: 20 30 40
output 的结果应为 30 40 50
我发现选取从结尾位置开始的一段范围与省略右操作数基本一致,不知道是否为有意为之。文档代码如下
int[] numbers = new[] { 0, 10, 20, 30, 40, 50 }; int[] subset = numbers[^3..]; Display(subset); // output: 30 40 50
选取数组中的范围中的四组代码通过只使用一次的变量来使用范围运算符,感觉降低了可读性
The text was updated successfully, but these errors were encountered:
No branches or pull requests
输出结果有误
在小标题选取从结尾位置开始的一段范围中,文档代码如下
output 的结果应为 30 40 50
内容重复
我发现选取从结尾位置开始的一段范围与省略右操作数基本一致,不知道是否为有意为之。文档代码如下
其他的一些小建议
选取数组中的范围中的四组代码通过只使用一次的变量来使用范围运算符,感觉降低了可读性
The text was updated successfully, but these errors were encountered: