コード例 #1
0
        public static void Main()
        {
            Console.WriteLine(FileNameParser.GetFileExtension("example"));
            Console.WriteLine(FileNameParser.GetFileExtension("example.pdf"));
            Console.WriteLine(FileNameParser.GetFileExtension("example.new.pdf"));

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

            Cuboid cube = new Cuboid(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());
        }
コード例 #2
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}",
                              DimentionalDistanceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}",
                              DimentionalDistanceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Cuboid cubloid = new Cuboid(2, 3, 4);

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

            Cuboid cubloid = new Cuboid(2, 3, 4);

            Console.WriteLine("Volume = {0:f2}", cubloid.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", cubloid.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", cubloid.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", cubloid.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", cubloid.CalcDiagonalYZ());
        }
コード例 #4
0
ファイル: Test.cs プロジェクト: MarKamenov/TelerikAcademy
        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("-------------------------");

            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));

            Console.WriteLine("-------------------------");

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