I am trying to apply condition at 2-3 instances (in outlook and DB row). Unfortunately, following alternatives are not working for me:
- If row/ mail/ mail.attachment etc. isnot nothing (it returns negative result each time whether there is an attachment in mail or not or similar cases)
- If mail is nothing ((it returns positive result each time whether there is an attachment in mail or not or similar cases). Basically, opposite scenario of point 1
- Isdbnull to assess if row is blank in one of the excel rows (always return positive result)
- Not dbrows.Any() to assess if row is blank in one of the excel rows (always return positive result)
- IsNothing(item) is also not a right approach here.
I am getting my feet wet in vb.net coding so a guidance to apply condition in the following situations would be helpful:
- to check if no new mail/ no attachment is arrived
- to check if one of the excel/ db rows is empty