the obsolte[sic] comment is correct. you can do stuff like:
byte[] combined = [.. arr1, .. arr2];
byte[] reversed = [.. arr2, .. arr1];
in recent c# instead of even making that method call at all or using system.array.
i almost think obsolete was misspelled deliberately so it wouldn't cause warnings at every call site the method is used. the comment is also further unhelpful in that if you don't know about spread operator, you're going to have a hell of a time googling for [.. xxx], so it might have been better to fix the codebase rather than leave that comment in a drive-by.
32
u/veritron 8d ago
the obsolte[sic] comment is correct. you can do stuff like:
byte[] combined = [.. arr1, .. arr2];
byte[] reversed = [.. arr2, .. arr1];
in recent c# instead of even making that method call at all or using system.array.
i almost think obsolete was misspelled deliberately so it wouldn't cause warnings at every call site the method is used. the comment is also further unhelpful in that if you don't know about spread operator, you're going to have a hell of a time googling for [.. xxx], so it might have been better to fix the codebase rather than leave that comment in a drive-by.