title: Exchange FindsItems return tasks
body: <p>I have a c# app with .net framework 4.7 working. I read that .net Framework will be replaced with .net Core, .net Standard so I wanted to move it to .net core 3.1</p>
  <p>Surprisingly, to get emails from exchange online the example that one can find everywhere
  &quot;foreach (EmailMessage email in exchange.FindItems(WellKnownFolderName.Inbox, new ItemView(100))&quot;
  does not work, returning VS CS1579 error
  &quot;foreach statement cannot operate on variables of type 'type1' because 'type2' does not contain a public definition for 'identifier'&quot;</p>
  <p>Of course, exchange.FindItems type is &quot;(awaitable) System.Threading.Tasks.Task&lt;FindItemsResults&gt;&quot;</p>
  <p>Looking at dozens of examples, I always find the same examples not using Tasks, so I do not find an example to make this works,</p>
  <ul>
  <li>is this new return type &quot;Task&quot; correct because of net core ?</li>
  <li>how can I implement this new type ?</li>
  </ul>
  <p>Thanks
  Olivier</p>