2009-12-04 UPDATE: For profiling results on a number of the suggestions posted here, see below!
Consider the following very
With a valid input could use
if (ActivCode.Length == 0) return MarketDataExchange.NBBO; if (ActivCode.Length == 1) return (MarketDataExchange) (ActivCode[0]); return (MarketDataExchange) (ActivCode[0] | ActivCode[1] << 8);