Conditions abracadabra...:(

Is there any faster way to learn all the ways to create conditions like:

  1.  mail.From.Address.Contains(row("Sender").toString)
    
  2. Convert.ToDateTime(Retreivedemail.Headers("Date"))>Convert.ToDateTime
                                                            (DateTime.Now.AddDays(-1).ToString("d"))
    

I’m following these trainings-sessions and every time they create these conditons, but not explaining how to get those conditon steps… Where and what can I learn to create and understand these? Are they typical .NET of C# or visual basic?

The rest is understandable but these conditions come out of the blue…

please advice…

Hello @Leon_Romans_van_Schaik - Yeah, these are .NET objects and properties. See an example here: MailMessage Class (System.Net.Mail) | Microsoft Learn

The mail object has a property From as seen in the table and in your first example. Each object/property/method has a dedicated page you can use for reference as long as you can search for them.

When you start thinking in terms of .NET or C# objects/property/method, it’s easier to recognize them when you see them.

You can also use the Intellisense feature by typing a dot “.” at the end of the object name like mail and it will show you a dropdown of all available properties and methods of that object. Wrench icons are properties and purple cubes are methods:

Let me know if you need more help. Thanks!

3 Likes

thxs @argin.lerit,
that helped me now i have to figure out when to use what :slight_smile:

kind regards,

Leon

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.