Is this the best way to determine that the List<int> ALogMsgTypeIntArray contains a 0?
if (ALogMsgTypeIntArray.Exists(delegate(int i) { return i == 0; }))
{
MessageBox.Show("0 exists");
}
==========
Updated:
I ended up doing it this-a-way:
bGetDebug = ALogMsgTypeIntList.Contains(LogParsePumpViewerConsts.LOG_MSG_TYPE_DEBUG);
bGetInfo = ALogMsgTypeIntList.Contains(LogParsePumpViewerConsts.LOG_MSG_TYPE_INFORMATION);
bGetWarning = ALogMsgTypeIntList.Contains(LogParsePumpViewerConsts.LOG_MSG_TYPE_WARNING);
bGetError = ALogMsgTypeIntList.Contains(LogParsePumpViewerConsts.LOG_MSG_TYPE_ERROR);
You can use the List<T>.Contains Method: