Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

PHP to C# Help

$
0
0

Hi, I've got some PHP code that I want to rewrite in C# and i'm pretty clueless. Thanks

This is just a snippet so it wont make must sense, I just need to know the syntax ect:

class Globals {
        const km2mi = 0.621371;
        const deg2rad = 1.745329251994330E-2;
        const pi = 3.14159265358979323846;
        const pio2 = 1.57079632679489656;
        const x3pio2 = 4.71238898038468967;
        const twopi = 6.28318530717958623;}

class vector {
        public $x;
        public $y;}

class tle {
        public $sat_name;
        public $line1;
        public $line2;

// SGP4 if false and SDP4 if true        
        public $epoch;
        public $xndt2o;}

function __construct($name, $line1, $line2) {
                $this -> sat_name = trim($name);
                $this -> line1 = $line1;
                $this -> line2 = $line2;
                $this -> idesg = substr($line1, 9, 8);
                $this -> catnum = (int)substr($line1, 2, 5);}


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>