How to assign a computed value to the same array back?
Answer Posted / Kanishka Pangti
To assign a computed value back to the same array in LINQ, you can use assignment operators like '='. Here's an example:n```csharpnint[] numbers = { 1, 2, 3, 4, 5 };nnumbers = numbers.Where(n => n > 3).ToArray();``` This will assign the result of filtering the array back to the original 'numbers' variable.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category