示例#1
0
        public static void Main()
        {
            Console.WriteLine(FileUtils.GetFileExtension("example"));
            Console.WriteLine(FileUtils.GetFileExtension("example.pdf"));
            Console.WriteLine(FileUtils.GetFileExtension("example.new.pdf"));

            Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example"));
            Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example.pdf"));
            Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example.new.pdf"));

            Console.WriteLine("Distance in the 2D space = {0:F2}", CalcDistance.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:F2}", CalcDistance.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Parallelepiped parallelepiped = new Parallelepiped(3, 4, 5);

            Console.WriteLine("Volume = {0:F2}", parallelepiped.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:F2}", parallelepiped.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:F2}", parallelepiped.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:F2}", parallelepiped.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:F2}", parallelepiped.CalcDiagonalYZ());
        }
示例#2
0
        private static void Main()
        {
            Console.WriteLine(GetFile.GetFileExtension("example"));
            Console.WriteLine(GetFile.GetFileExtension("example.pdf"));
            Console.WriteLine(GetFile.GetFileExtension("example.new.pdf"));

            Console.WriteLine(GetFile.GetFileNameWithoutExtension("example"));
            Console.WriteLine(GetFile.GetFileNameWithoutExtension("example.pdf"));
            Console.WriteLine(GetFile.GetFileNameWithoutExtension("example.new.pdf"));

            Console.WriteLine("Distance in the 2D space = {0:f2}",
                              CalcDistance.CalculateDistanceIn2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}",
                              CalcDistance.CalculateDistanceIn3D(5, 2, -1, 3, -6, 4));

            //     Console.WriteLine("Volume = {0:f2}", Parallelepiped.CalcVolume());
            //     Console.WriteLine("Diagonal XYZ = {0:f2}", Utils.CalcDiagonalXYZ());
            //     Console.WriteLine("Diagonal XY = {0:f2}", Utils.CalcDiagonalXY());
            //     Console.WriteLine("Diagonal XZ = {0:f2}", Utils.CalcDiagonalXZ());
            //     Console.WriteLine("Diagonal YZ = {0:f2}", Utils.CalcDiagonalYZ());
        }
        private static void Main()
        {
            Console.WriteLine(File.GetFileExtension("example"));
            Console.WriteLine(File.GetFileExtension("example.pdf"));
            Console.WriteLine(File.GetFileExtension("example.new.pdf"));

            Console.WriteLine(File.GetFileNameWithoutExtension("example"));
            Console.WriteLine(File.GetFileNameWithoutExtension("example.pdf"));
            Console.WriteLine(File.GetFileNameWithoutExtension("example.new.pdf"));

            Console.WriteLine("Distance in the 2D space = {0:f2}",
                              CalcDistance.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}",
                              CalcDistance.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Utils.Width  = 3;
            Utils.Height = 4;
            Utils.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", Utils.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", Utils.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", Utils.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", Utils.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", Utils.CalcDiagonalYZ());
        }
示例#4
0
        public double CalculateDiagonalXz()
        {
            double distance = CalcDistance.CalculateDistanceIn2D(0, 0, Width, Depth);

            return(distance);
        }
示例#5
0
        public double CalculateDiagonalYz()
        {
            double distance = CalcDistance.CalculateDistanceIn2D(0, 0, Height, Depth);

            return(distance);
        }
示例#6
0
        public double CalculateDiagonalXy()
        {
            double distance = CalcDistance.CalculateDistanceIn2D(0, 0, Width, Height);

            return(distance);
        }
示例#7
0
        public double CalculateDiagonalXyz()
        {
            double distance = CalcDistance.CalculateDistanceIn3D(0, 0, 0, Width, Height, Depth);

            return(distance);
        }
        public double CalcDiagonalYZ()
        {
            double distance = CalcDistance.CalcDistance2D(0, 0, this.Height, this.Depth);

            return(distance);
        }
        public double CalcDiagonalXZ()
        {
            double distance = CalcDistance.CalcDistance2D(0, 0, this.Width, this.Depth);

            return(distance);
        }
        public double CalcDiagonalXY()
        {
            double distance = CalcDistance.CalcDistance2D(0, 0, this.Width, this.Height);

            return(distance);
        }