问题
The MSDN page on ConnectionState enumeration says "This value is reserved for future versions of the product", for all values except Open and Closed. What does that mean? Are other values even used?
However from this StackOverflow answer appears that ConnectionState.Broken is also used.
回答1:
After spending some time in Reflector, it looks to me like the Broken and Fetching states are also used in at least one or two places. The best coding practice would be to assume that any of the values might be used, and code defensively. For instance, if you need to know if the connection is open, check for state == Open, rather than state != Closed.
来源:https://stackoverflow.com/questions/246316/are-open-and-closed-only-relevant-values-of-connectionstate-enumeration