public static void Main()
        {
            Console.WriteLine(FileNameManager.GetFileExtension("example"));
            Console.WriteLine(FileNameManager.GetFileExtension("example.pdf"));
            Console.WriteLine(FileNameManager.GetFileExtension("example.new.pdf"));

            Console.WriteLine(FileNameManager.GetFileNameWithoutExtension("example"));
            Console.WriteLine(FileNameManager.GetFileNameWithoutExtension("example.pdf"));
            Console.WriteLine(FileNameManager.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));

            double width    = 3;
            double height   = 4;
            double depth    = 5;
            var    figure3D = new Figure3D(width, height, depth);

            Console.WriteLine("Volume = {0:f2}", figure3D.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", figure3D.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", figure3D.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", figure3D.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", figure3D.CalcDiagonalYZ());
        }
Exemple #2
0
        static void Main()
        {
            Console.WriteLine(FileOperations.GetFileExtension("example"));
            Console.WriteLine(FileOperations.GetFileExtension("example.pdf"));
            Console.WriteLine(FileOperations.GetFileExtension("example.new.pdf"));

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

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

            Figure3D figure3D = new Figure3D();

            figure3D.Width  = 3;
            figure3D.Height = 4;
            figure3D.Depth  = 5;

            Console.WriteLine("Volume = {0:f2}", figure3D.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", figure3D.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", figure3D.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", figure3D.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", figure3D.CalcDiagonalYZ());
        }
Exemple #3
0
        private static void Main()
        {
            Console.WriteLine(FileNameSplitter.GetFileExtension("example"));
            Console.WriteLine(FileNameSplitter.GetFileExtension("example.pdf"));
            Console.WriteLine(FileNameSplitter.GetFileExtension("example.new.pdf"));

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

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

            var figure3D = new Figure3D(4, 3, 5);

            Console.WriteLine("Volume = {0:f2}", figure3D.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", figure3D.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", figure3D.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", figure3D.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", figure3D.CalcDiagonalYZ());
        }
        static void Main()
        {
            Console.WriteLine(UtilsFile.SplitFileNameAndExtension("example")[1]);
            Console.WriteLine(UtilsFile.SplitFileNameAndExtension("example.pdf")[1]);
            Console.WriteLine(UtilsFile.SplitFileNameAndExtension("example.new.pdf")[1]);

            Console.WriteLine(UtilsFile.SplitFileNameAndExtension("example")[0]);
            Console.WriteLine(UtilsFile.SplitFileNameAndExtension("example.pdf")[0]);
            Console.WriteLine(UtilsFile.SplitFileNameAndExtension("example.new.pdf")[0]);

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

            Figure3D figure = new Figure3D(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", figure.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", figure.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", figure.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", figure.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", figure.CalcDiagonalYZ());
        }
Exemple #5
0
        internal 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}",
                DistanceCalculator.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                DistanceCalculator.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Figure3D figure = new Figure3D(3, 4, 5);
            Console.WriteLine("Figure3D Volume = {0:f2}", figure.CalcVolume());
            Console.WriteLine("Figure3D Diagonal XYZ = {0:f2}", figure.CalcDiagonalXYZ());
            Console.WriteLine("Figure3D Diagonal XY = {0:f2}", figure.CalcDiagonalXY());
            Console.WriteLine("Figure3D Diagonal XZ = {0:f2}", figure.CalcDiagonalXZ());
            Console.WriteLine("Figure3D Diagonal YZ = {0:f2}", figure.CalcDiagonalYZ());
        }