How to get Dynamics CRM Version number using CRM SDK and C# Console Application?

Use the below code to get the Dynamics CRM Version number using CRM SDK and Console Application C#.

RetrieveVersionRequest request = new RetrieveVersionRequest();

RetrieveVersionResponse response = (RetrieveVersionResponse)organizationService.Execute(request);
Version version = new Version(response.Version);
and include the above code to check the result.
Final code looks like the below.
Retrieve Version Request and Response
Output:
Retrieve Version Request and Response - Output
Note:
This feature was released in Microsoft Dynamics CRM 2015 Online Update 1
(v7.1) and will work perfectly in the below CRM versions
Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016,
Dynamics CRM Online