Connecting to Dynamics 365 using C#

There are multiple methods for connecting to Microsoft Dynamics from a command line application. Here is a lit of a few methods.