微软C#文档出错 2023-12-18 7 碎碎念 链接见 https://learn.microsoft.com/zh-cn/dotnet/csharp/language-reference/operators/conditional-operator#conditional-ref-expression 我记得我七号给微软发过report,等到我今天写这篇博客还没修正 ```csharp int[] smallArray = [1, 2, 3, 4, 5]; int[] largeArray = [10, 20, 30, 40, 50]; int index = 7; ref int refValue = ref ((index < 5) ? ref smallArray[index] : ref largeArray[index - 5]); refValue = 0; index = 2; ((index < 5) ? ref smallArray[index] : ref largeArray[index - 5]) = 100; Console.WriteLine(string.Join(" ", smallArray)); Console.WriteLine(string.Join(" ", largeArray)); // Output: // 1 2 100 4 5 // 10 20 0 40 50 ``` L1和L2的数组定义错误,初始化的花括号打成中括号了。  本文链接: https://shrinken.pw/crash-2023-12-18_65-fml.html