Prettify gives types and methods the same class when tokenizing c# so they are colored the same. This is because methods are pascal case in c# instead of camel case like in java
The problem is that without context, it's impossible to find out whether it's a method or a type.
Take the following example:
var value = new Test();
Test();
This example instantiates a new Test
and then calls the method Test
. The only way to find out which is a class and which is a type is by having 1. the entire code base and 2. a compiler.
And then I haven't even touched invalid code.
That being said, I think that the current prettifier as used by SO does a terrific job of highlighting the code samples without any context whatsoever.