-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Description
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work] [regression] [worked-in:16.7]
The following code:
class Program
{
static void Main(string[] args)
{
const string s = "abc";
const string sz = "abc\0";
void Report(string str)
=> Console.WriteLine($"\"{str}\" ({str. Length}), zero-terminated: {str. EndsWith("\0")}");
Report(s);
Report(sz);
}
}
gives the following output for target framework .net 5.0:
"abc" (3), zero-terminated: True
"abc" (4), zero-terminated: True
For target framework .netcoreapp3.1 the code outputs the following lines:
"abc" (3), zero-terminated: False
"abc" (4), zero-terminated: True
As for me, .net core 3.1 behavior looks correct and .net 5.0 does not.
Original Comments
Feedback Bot on 12/9/2020, 10:13 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
Reactions are currently unavailable