Question

This is a number that's returned as an exit code in many .NET exceptions (particularly COM exceptions, I think).

In this question someone used Reflector to find out that this value was initialized to a private variable in nearly every Exception constructor.

My question is, why? What significance does this number have? It's hard to believe that it was chosen arbitrarily. I don't even see any numeric significance (e.g., in its binary or hex representation).

Was it helpful?

Solution

Did you pay attention to its hex representation, E0434F4D? Here's a brief synopsis:

E0 - represents E
43 - ASCII for C
4F - ASCII for O
4D - ASCII for M

So it's ECOM, or "exception from COM".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top