Пример #1
0
        static void Main()
        {
            var fileNames = new string[] { "example", "example.pdf", "example.new.pdf" };
            foreach (var fileName in fileNames)
            {
                string fileExtension = FileUtils.GetFileExtension(fileName);
                string fileNameWithoutExtension = FileUtils.GetFileNameWithoutExtension(fileName);

                Console.WriteLine(fileExtension);
                Console.WriteLine(fileNameWithoutExtension);
            }

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

            Parallelepiped parallelepiped = new Parallelepiped(3, 4, 5);
            double paralVolume = parallelepiped.CalcVolume();
            double paralBodyDiagonal = parallelepiped.CalcBodyDiagonal();
            double paralDiagonalXY = parallelepiped.CalcDiagonalXY();
            double paralDiagonalXZ = parallelepiped.CalcDiagonalXZ();
            double paralDiagonalYZ = parallelepiped.CalcDiagonalYZ();

            Console.WriteLine("Volume = {0:f2}", paralVolume);
            Console.WriteLine("Diagonal XYZ = {0:f2}", paralBodyDiagonal);
            Console.WriteLine("Diagonal XY = {0:f2}", paralDiagonalXY);
            Console.WriteLine("Diagonal XZ = {0:f2}", paralDiagonalXZ);
            Console.WriteLine("Diagonal YZ = {0:f2}", paralDiagonalYZ);
        }
        public static void Main()
        {
            Console.WriteLine(FileUtilities.GetFileExtension("example"));
            Console.WriteLine(FileUtilities.GetFileExtension("example.pdf"));
            Console.WriteLine(FileUtilities.GetFileExtension("example.new.pdf"));

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

            Console.WriteLine(
                "Distance in the 2D space = {0:f2}",
                CalculateDistanceBetweenTwoPoints.In2DSpace(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                CalculateDistanceBetweenTwoPoints.In3DSpace(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());
        }
Пример #3
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}",
                GeometryUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                GeometryUtils.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());
        }
Пример #4
0
        static void Main()
        {
            var fileNames = new string[] { "example", "example.pdf", "example.new.pdf" };

            foreach (var fileName in fileNames)
            {
                string fileExtension            = FileUtils.GetFileExtension(fileName);
                string fileNameWithoutExtension = FileUtils.GetFileNameWithoutExtension(fileName);

                Console.WriteLine(fileExtension);
                Console.WriteLine(fileNameWithoutExtension);
            }

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

            Parallelepiped parallelepiped    = new Parallelepiped(3, 4, 5);
            double         paralVolume       = parallelepiped.CalcVolume();
            double         paralBodyDiagonal = parallelepiped.CalcBodyDiagonal();
            double         paralDiagonalXY   = parallelepiped.CalcDiagonalXY();
            double         paralDiagonalXZ   = parallelepiped.CalcDiagonalXZ();
            double         paralDiagonalYZ   = parallelepiped.CalcDiagonalYZ();

            Console.WriteLine("Volume = {0:f2}", paralVolume);
            Console.WriteLine("Diagonal XYZ = {0:f2}", paralBodyDiagonal);
            Console.WriteLine("Diagonal XY = {0:f2}", paralDiagonalXY);
            Console.WriteLine("Diagonal XZ = {0:f2}", paralDiagonalXZ);
            Console.WriteLine("Diagonal YZ = {0:f2}", paralDiagonalYZ);
        }
        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());
        }
Пример #6
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}", SpaceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}", SpaceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Parallelepiped.Width  = 3;
            Parallelepiped.Height = 4;
            Parallelepiped.Depth  = 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());
        }
        public static void Main()
        {
            Console.WriteLine(FileUtilities.GetFileExtension("example"));
            Console.WriteLine(FileUtilities.GetFileExtension("example.pdf"));
            Console.WriteLine(FileUtilities.GetFileExtension("example.new.pdf"));

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

            Console.WriteLine(
                "Distance in the 2D space = {0:f2}",
                CalculateDistanceBetweenTwoPoints.In2DSpace(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                CalculateDistanceBetweenTwoPoints.In3DSpace(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());
        }