If you look at the definition of HttpStatusCode, you'll find that there is more than one enum member for the value 302
. Based on the docs, when there is more than one definition, the resulting string value will not always be the same. Take a look at the GetName method (which is what ToString pretty much does).
http://msdn.microsoft.com/en-us/library/system.enum.getname(v=vs.110).aspx
If multiple enumeration members have the same underlying value, the GetName method guarantees that it will return the name of one of those enumeration members. However, it does not guarantee that it will always return the name of the same enumeration member. As a result, when multiple enumeration members have the same value, your application code should never depend on the method returning a particular member's name.
Take a look at this answer for some more insight: Why is it okay for an enum to have two different names with the same numeric value?