android - Where to find or download USB Driver folder?
Driver on

c# – System.Device not found in Visual 2019 Mac

I’m utilizing System.Machine.Location in .Internet.

It really works nicely in my Home windows system however once I use the identical code in my MacBook model of visible studio, it is not compiling:

The sort or namespace identify ‘Machine’ doesn’t exist within the namespace ‘System’ (are you lacking an meeting reference?) (CS0234)

Right here is my code:

utilizing Toonbank.Vendor.Entity.DashBoard;
utilizing System;
utilizing System.Collections.Generic;
utilizing System.Linq;
utilizing System.Internet;
utilizing System.Machine.Location;

namespace Toonbank.Vendor.Bal
    public class CalculateDistance
        public double CalculateDistanceBetweenTwoPoints(CalculateDistanceClass obj)
            //double latA = -31.997976f;
            // double longA = 115.762877f;
            //  double latB = -31.99212f;
            // double longB = 115.763228f;

            var locA = new GeoCoordinate(obj.lat1, obj.lon1);
            var locB = new GeoCoordinate(obj.lat2, obj.lon2);
            double distance = locA.GetDistanceTo(locB); // me
            double distanceToKm = distance / 1000;
            return distanceToKm;

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *