boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

Get Current Location of Device in C# with Longitude & Latitude

Updated on     Kisan Patel

To get the current location of device, you have to add reference to System.Device DLL.

GeoCoordinateWatcher class supplies location data that is based on latitude and longitude coordinates.

The following program shows how to use a GeoCoordinateWatcher class to obtain current location:

using System;
using System.Device.Location;

namespace WhereAmI
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Starting GeoCoordinate Watcher...");

            // 2. Use the GeoCoordinate Watcher

            var watcher = new GeoCoordinateWatcher();

            watcher.StatusChanged += (s, e) =>
            {
                Console.WriteLine($"GeoCoordinateWatcher:StatusChanged:{e.Status}");
            };

            watcher.PositionChanged += (s, e) =>
            {
                Console.WriteLine($"GeoCoordinateWatcher:PositionChanged:{e.Position.Location}");
            };

            watcher.MovementThreshold = 100;

            watcher.Start();

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
    }
}

ASP.NET C# WPF

Leave a Reply