public static EnumValueCollection GetListFrom(ICamera aCamera, uint aType, EnumValueCollection aCollection) { EnumValueCollection result = new EnumValueCollection(); uint[] rawValues = aCamera.GetAvailableValues(aType); ArrayList unsupported = new ArrayList(); for (int i = 0; i < rawValues.Length; i++) { uint enumValue = rawValues[i]; if (enumValue != 0) { try { result.Add(aCollection[enumValue]); } catch { unsupported.Add(enumValue); } } } return(result); }