How to get Device Geo-location in C#

How to get Device Location in C# with Longitude & Latitude in C#. This C# tutorial is about getting location of the user in C#.NET using GeoPositionStatus.

First of All you have to add reference to System.Device DLL. If you don’t know How to add a Reference to DLL , Click Here>. But instead of going to Browse option, go to .NET option & Find System.Device. As follows.

Now you will be able to use┬áusing System.Device.Location; .Now Add this to your Assemblies. & You are Done. ­čÖé .

Source Code:

Here is the main logical code. For the working application, Download from below at the end of article.


Output of this Project is as follows.


Additionally You can also Download this Complete C# Source Code.

Download C# Code for Device Location

I Hope this example will help you out. If you still need any help regarding this program or any other program, Must join our C# Group & Programming Group on Facebook & Comment below to let me know your Problem.

11 thoughts on “How to get Device Geo-location in C#”

    • Yes . It would be better to that. Bcz sometime user device setting doesnt allow to acces location of device. but in Google Maps, they track your IP so thats a good option.

  1. Watcher.StatusChanged += Watcher_StatusChanged;

    what this line does?with assignment operator why + has been used?

  2. Hi,

    Added the System.Device.Location, but i don’t have the GeoCoordinateWatcher class.
    Do you know what the problem could be?


Comments are closed.