public static void Main() { try { Console.WriteLine(FileUtils.GetFileExtension("example")); } catch (ArgumentException ex) { Console.WriteLine(ex.Message); } 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}", Geometry2DUtils.CalculateDistance2D(1, -2, 3, 4)); Console.WriteLine( "Distance in the 3D space = {0:f2}", Geometry3DUtils.CalculateDistance3D(5, 2, -1, 3, -6, 4)); var point3D = new Point3D(3, 4, 5); Console.WriteLine("Volume = {0:f2}", Geometry3DUtils.CalcVolume(point3D)); Console.WriteLine("Diagonal XYZ = {0:f2}", Geometry3DUtils.CalculateDiagonalXYZ(point3D)); Console.WriteLine("Diagonal XY = {0:f2}", Geometry3DUtils.CalculateDiagonalXY(point3D)); Console.WriteLine("Diagonal XZ = {0:f2}", Geometry3DUtils.CalculateDiagonalXZ(point3D)); Console.WriteLine("Diagonal YZ = {0:f2}", Geometry3DUtils.CalculateDiagonalYZ(point3D)); }
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}", Geometry2DUtils.CalcDistance(1, -2, 3, 4)); Console.WriteLine("Distance in the 3D space = {0:f2}", Geometry3DUtils.CalcDistance(5, 2, -1, 3, -6, 4)); var parallelepiped = new Parallelepiped(3, 4, 5); Console.WriteLine("Volume = {0:f2}", parallelepiped.CalcVolume()); var diagonalXYZ = Geometry3DUtils.CalcDistance(0, 0, 0, parallelepiped.Width, parallelepiped.Height, parallelepiped.Depth); Console.WriteLine("Diagonal XYZ = {0:f2}", diagonalXYZ); var diagonalXY = Geometry2DUtils.CalcDistance(0, parallelepiped.Width, 0, parallelepiped.Height); Console.WriteLine("Diagonal XY = {0:f2}", diagonalXY); var diagonalXZ = Geometry2DUtils.CalcDistance(0, parallelepiped.Width, 0, parallelepiped.Depth); Console.WriteLine("Diagonal XZ = {0:f2}", diagonalXZ); var diagonalYZ = Geometry2DUtils.CalcDistance(0, parallelepiped.Height, 0, parallelepiped.Depth); Console.WriteLine("Diagonal YZ = {0:f2}", diagonalYZ); }
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}", Geometry2DUtils.CalcDistance2D(1, -2, 3, 4)); Console.WriteLine("Distance in the 3D space = {0:f2}", Geometry3DUtils.CalcDistance3D(5, 2, -1, 3, -6, 4)); Figure3D figure = new Figure3D(3, 4, 5); Console.WriteLine("Volume = {0:f2}", Geometry3DUtils.CalcVolume(figure)); Console.WriteLine("Diagonal XYZ = {0:f2}", Geometry3DUtils.CalcDiagonalXYZ(figure)); Console.WriteLine("Diagonal XY = {0:f2}", Geometry3DUtils.CalcDiagonalXY(figure)); Console.WriteLine("Diagonal XZ = {0:f2}", Geometry3DUtils.CalcDiagonalXZ(figure)); Console.WriteLine("Diagonal YZ = {0:f2}", Geometry3DUtils.CalcDiagonalYZ(figure)); }