What is the longest legal statement block you can make with only C# keywords?

后端 未结 8 1425
粉色の甜心
粉色の甜心 2020-12-28 16:39

I was writing some code in C#, and I found myself writing:

return new MyClass(...

when I noticed that both the return and the

8条回答
  •  执笔经年
    2020-12-28 17:18

    Here is another case that can be as long as you wish:

    do do do do do do do do do do do do do do do // ...
    while(x) while(x) while(x) while(x) while(x) // ...
    

    With contextual keywords you can also have

    await await await await await await await // ...
    

提交回复
热议问题