Ejemplo n.º 1
0
        private static void Main()
        {
            Console.WriteLine(FileNameUtilities.GetFileExtension("example"));
            Console.WriteLine(FileNameUtilities.GetFileExtension("example.pdf"));
            Console.WriteLine(FileNameUtilities.GetFileExtension("example.new.pdf"));

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

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

            Cube sampleCube = new Cube()
            {
                Width = 3, Height = 4, Depth = 5
            };

            Console.WriteLine("Volume = {0:f2}", sampleCube.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", sampleCube.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", sampleCube.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", sampleCube.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", sampleCube.CalcDiagonalYZ());
        }
Ejemplo n.º 2
0
        private static void Main()
        {
            Console.WriteLine(FileExtensions.GetFileExtension("example"));
            Console.WriteLine(FileExtensions.GetFileExtension("example.pdf"));
            Console.WriteLine(FileExtensions.GetFileExtension("example.new.pdf"));

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

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

            Cube.Width  = 3;
            Cube.Height = 4;
            Cube.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", Cube.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", Cube.CalculateDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", Cube.CalculateDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", Cube.CalculateDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", Cube.CalculateDiagonalYZ());
        }
Ejemplo n.º 3
0
        private static void Main()
        {
            Console.WriteLine(FileNameUtilities.GetFileExtension("example"));
            Console.WriteLine(FileNameUtilities.GetFileExtension("example.pdf"));
            Console.WriteLine(FileNameUtilities.GetFileExtension("example.new.pdf"));

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

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

            Cube exampleCube = new Cube() { Width = 3, Height = 4, Depth = 5 };
            Console.WriteLine("Volume = {0:f2}", exampleCube.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", exampleCube.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", exampleCube.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", exampleCube.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", exampleCube.CalcDiagonalYZ());
        }
        static void Main()
        {
            Console.WriteLine(FileExtensions.GetFileExtension("example"));
            Console.WriteLine(FileExtensions.GetFileExtension("example.pdf"));
            Console.WriteLine(FileExtensions.GetFileExtension("example.new.pdf"));

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

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

            Cube cube = new Cube(3, 4, 5);
            Console.WriteLine("Volume = {0:f2}", cube.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", cube.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", cube.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", cube.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", cube.CalcDiagonalYZ());
        }
Ejemplo n.º 5
0
        static void Main()
        {
            Console.WriteLine(FileExtensions.GetFileExtension("example"));
            Console.WriteLine(FileExtensions.GetFileExtension("example.pdf"));
            Console.WriteLine(FileExtensions.GetFileExtension("example.new.pdf"));

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

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

            Cube cube = new Cube(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", cube.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", cube.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", cube.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", cube.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", cube.CalcDiagonalYZ());
        }