Why can't a using variable be used within a switch section without braces in C#?

前端 未结 0 573
后悔当初
后悔当初 2020-12-16 09:00

Consider the following code:

    switch ("")
    {
        case "":
            using var s = new MemoryStream();

            break;
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题