Can this line of code really throw an IndexOutOfRange exception?
- by Jonathan M
I am getting an IndexOutOfRange exception on the following line of code:
var searchLastCriteria = (SearchCriteria)Session.GetSafely(WebConstants.KeyNames.SEARCH_LAST_CRITERIA);
I'll explain the above here:
SearchCriteria is an Enum with only two values
Session is the HttpSessionState
GetSafely is an extension method that looks like this:
…