In C# 3.0 we got a lot of cool tools at our disposal with anonymous types, lambda expressions etc. This sometimes leads to some... interesting looking code that contains a smaller sequence of special characters.
Although it's not Friday yet, I thought I'd ask: What's the longest, most obscure sequence of non-character C# code you can write?
Some rules:
- The code must compile.
- With non-character are meant any character that has special meaning in C#, such as
<>{}[]&|
etc. Unicode characters like æ, ø or å means nothing to C#, so don't count. - No repeating patterns are allowed - e.g. a lot of nested statements with closing curly braces:
}}}}}
are not allowed, and neither are variations thereof:})})})
- Whitespace is allowed, but doesn't count
- Only characters in code count. That is: characters within strings don't.
To get you started, here's an example of what I mean:
this.Action = () => { };
This compiles if the enclosing type has an Action property defined like this:
public Action Action { get; set; }
Not counting whitespace, this statement has 8 special characters in a sequence, but I'm sure you can do much better.
I will accept the valid answer that has the longest sequence. In case of ties, I will pick the one with most votes.