Beispiel #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}", Utils2D.CalculateDistance(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}", Utils3D.CalculateDistance(5, 2, -1, 3, -6, 4));

            double width  = 3;
            double height = 4;
            double depth  = 5;

            Console.WriteLine("Volume in 3D = {0:f2}", Utils3D.CalculateVolume(width, height, depth));
            Console.WriteLine("Diagonal in 3D = {0:f2}", Utils3D.CalculateDiagonal(width, height, depth));

            Console.WriteLine("Diagonal (XY) in 2D = {0:f2}", Utils2D.CalculateDiagonal(width, height));
            Console.WriteLine("Diagonal (XZ) in 2D = {0:f2}", Utils2D.CalculateDiagonal(height, depth));
            Console.WriteLine("Diagonal (YZ) in 2D = {0:f2}", Utils2D.CalculateDiagonal(width, depth));

            Console.WriteLine("Volume in 3D = {0}", Utils3D.CalculateVolume(5, 3, 7));
        }
Beispiel #2
0
        internal static void Main()
        {
            Console.WriteLine(Utils.GetFileExtension("example"));
            Console.WriteLine(Utils.GetFileExtension("example.pdf"));
            Console.WriteLine(Utils.GetFileExtension("example.new.pdf"));

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

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

            Console.WriteLine("Volume = {0:f2}", Utils3D.CalcVolume(3, 4, 5));
            Console.WriteLine("Diagonal XYZ = {0:f2}", Utils3D.CalcDiagonal3D(3, 4, 5));
            Console.WriteLine("Diagonal XY = {0:f2}", Utils2D.CalcDiagonal2D(3, 4));
            Console.WriteLine("Diagonal XZ = {0:f2}", Utils2D.CalcDiagonal2D(3, 5));
            Console.WriteLine("Diagonal YZ = {0:f2}", Utils2D.CalcDiagonal2D(4, 5));
        }
        public static void Main()
        {
            Console.WriteLine(FileExtensionUtils.GetFileExtension("example"));
            Console.WriteLine(FileExtensionUtils.GetFileExtension("example.pdf"));
            Console.WriteLine(FileExtensionUtils.GetFileExtension("example.new.pdf"));

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

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

            double width  = 3;
            double height = 4;
            double depth  = 5;

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

            Utils2D.Width  = 3;
            Utils2D.Height = 4;
            Utils3D.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", Utils3D.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", Utils3D.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", Utils2D.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", Utils2D.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", Utils2D.CalcDiagonalYZ());
        }