Пример #1
0
        public 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}", Calculations2D.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}", Calculations3D.CalcDistance3D(5, 2, -1, 3, -6, 4));

            var someShape = new Shape();

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

            Console.WriteLine("Volume = {0:f2}", Calculations3D.CalcVolume(someShape));
            Console.WriteLine("Diagonal XYZ = {0:f2}", Calculations3D.CalcDiagonalXYZ(someShape));
            Console.WriteLine("Diagonal XY = {0:f2}", Calculations2D.CalcDiagonalXY(someShape));
            Console.WriteLine("Diagonal XZ = {0:f2}", Calculations2D.CalcDiagonalXZ(someShape));
            Console.WriteLine("Diagonal YZ = {0:f2}", Calculations2D.CalcDiagonalYZ(someShape));
        }
Пример #2
0
        static void Main()
        {
            Console.WriteLine(FileName.GetFileExtension("example"));
            Console.WriteLine(FileName.GetFileExtension("example.pdf"));
            Console.WriteLine(FileName.GetFileExtension("example.new.pdf"));

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

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

            Dimensions.Width  = 3;
            Dimensions.Height = 4;
            Dimensions.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", Calculations3D.CalculateVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", Calculations3D.CalculateDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", Calculations2D.CalculateDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", Calculations2D.CalculateDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", Calculations2D.CalculateDiagonalYZ());
        }
Пример #3
0
        public static double CalculateDiagonalXYZ()
        {
            double distance = Calculations3D.CalculateDistance3D(0, 0, 0, Dimensions.Width, Dimensions.Height, Dimensions.Depth);

            return(distance);
        }
Пример #4
0
        public static double CalcDiagonalXYZ(Shape shape)
        {
            double distance = Calculations3D.CalcDistance3D(0, 0, 0, shape.Width, shape.Height, shape.Depth);

            return(distance);
        }