Search code examples
c#asp.net.net-4.5httpapplication

Is `_[....]` a valid identifier?


I've just installed the .NET 4.5 reference source from Microsoft as I'm trying to debug an issue I'm seeing and I stumbled across the following in HttpApplication.cs.

// execution step -- call asynchronous event
internal class AsyncEventExecutionStep : IExecutionStep { 
    private HttpApplication     _application;
    private BeginEventHandler   _beginHandler;
    private EndEventHandler     _endHandler;
    private Object              _state; 
    private AsyncCallback       _completionCallback;
    private AsyncStepCompletionInfo _asyncStepCompletionInfo; // per call 
    private bool                _[....];          // per call 
    private string              _targetTypeStr;

Notice the next-to-last line private bool _[....]; // per call.

Is _[....] a valid identifier (at any level of compilation, including IL) or has the source been changed since compilation?


Solution

  • No; that's not valid.

    Before releasing the source, Microsoft ran it through a poorly-written internal tool that replaces all employee names with [....].
    Unfortunately, the tool replaces actual source as well.

    This is actually counter-productive; you can find out what most of the hidden source actually was by looking in the compiled metadata (eg, in Reflector).

    Your particular line should be private bool _sync