Alex Rivera | Logout

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

Asked 2009-03-23T11:12:28.073
21

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

return new MyClass(...

when I noticed that both the return and the new were both C# keywords. So I wondered what is the longest legal sequence of keywords in C#. All I could think of is:

internal static override void MyFunc(...

Where internal static override void are all keywords. Can you think of a longer sequence of keywords?

Note: There's really no point to the question. I'm just hoping to pour more some fun on the fire :-)

Edit
Report

1 Answer

1
internal protected static volatile string foo = "bar";

That's 5.

answered 2009-03-23T11:18:54.173

Your Answer