static void Main() { Console.WriteLine(FileUtils.GetFileExtension("example")); Console.WriteLine(FileUtils.GetFileExtension("example.pdf")); Console.WriteLine(FileUtils.GetFileExtension("example.new.pdf") + "\n"); Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example")); Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example.pdf")); Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example.new.pdf")); var pointA = new Point(1, -2); var pointB = new Point(3, 4); var pointC = new Point(-6, 4); Console.WriteLine("\nDistance in the 2D space = {0:f2}", GeometryUtils.CalcDistance2D(pointA, pointB)); Console.WriteLine("Distance in the 3D space = {0:f2}", GeometryUtils.CalcDistance3D(pointA, pointB, pointC)); var prism = new RectangularParallelepiped(3, 4, 5); Console.WriteLine("\nVolume = {0:f2}", prism.CalcVolume()); Console.WriteLine("Diagonal XYZ = {0:f2}", prism.CalcDiagonalXYZ()); Console.WriteLine("Diagonal XY = {0:f2}", prism.CalcDiagonalXY()); Console.WriteLine("Diagonal XZ = {0:f2}", prism.CalcDiagonalXZ()); Console.WriteLine("Diagonal YZ = {0:f2}", prism.CalcDiagonalYZ()); }
static void Main() { Console.WriteLine(FileUtils.GetFileExtension("example")); Console.WriteLine(FileUtils.GetFileExtension("example.pdf")); Console.WriteLine(FileUtils.GetFileExtension("example.new.File")); 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}", GeometryUtils.CalcDistance2D(1, -2, 3, 4)); Console.WriteLine("Distance in the 3D space = {0:f2}", GeometryUtils.CalcDistance3D(5, 2, -1, 3, -6, 4)); double width = 3; double height = 4; double depth = 5; var rectangle = new RectangularParallelepiped(width, height, depth); Console.WriteLine("Volume = {0:f2}", rectangle.CalcVolume()); Console.WriteLine("Diagonal XYZ = {0:f2}", rectangle.CalcDiagonalXYZ()); Console.WriteLine("Diagonal XY = {0:f2}", rectangle.CalcDiagonalXY()); Console.WriteLine("Diagonal XZ = {0:f2}", rectangle.CalcDiagonalXZ()); Console.WriteLine("Diagonal YZ = {0:f2}", rectangle.CalcDiagonalYZ()); }
public static void Main() { Console.WriteLine(FileHandlingUtilities.GetFileExtension("example")); Console.WriteLine(FileHandlingUtilities.GetFileExtension("example.pdf")); Console.WriteLine(FileHandlingUtilities.GetFileExtension("example.new.pdf")); Console.WriteLine(FileHandlingUtilities.GetFileNameWithoutExtension("example")); Console.WriteLine(FileHandlingUtilities.GetFileNameWithoutExtension("example.pdf")); Console.WriteLine(FileHandlingUtilities.GetFileNameWithoutExtension("example.new.pdf")); Console.WriteLine(); Console.WriteLine( "Distance in the 2D space = {0:f2}", GeometrylUtilities.CalcDistance2D( new Point(1, -2), new Point(3, -4))); Console.WriteLine( "Distance in the 3D space = {0:f2}", GeometrylUtilities.CalcDistance3D( new Point3D(1, 5, 9), new Point3D(2, -5, 9))); Console.WriteLine(); RectangularParallelepiped rectParal = new RectangularParallelepiped(3, 4, 5); Console.WriteLine("Volume = {0:f2}", rectParal.CalcVolume()); Console.WriteLine("Diagonal XYZ = {0:f2}", rectParal.CalcDiagonalXYZ()); Console.WriteLine("Diagonal XY = {0:f2}", rectParal.CalcDiagonalXY()); Console.WriteLine("Diagonal XZ = {0:f2}", rectParal.CalcDiagonalXZ()); Console.WriteLine("Diagonal YZ = {0:f2}", rectParal.CalcDiagonalYZ()); }
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}", GeometryUtils.CalcDistance2D(1, -2, 3, 4)); Console.WriteLine("Distance in the 3D space = {0:f2}", GeometryUtils.CalcDistance3D(5, 2, -1, 3, -6, 4)); RectangularParallelepiped parallelepiped = new RectangularParallelepiped(3, 4, 5); Console.WriteLine("Volume = {0:f2}", parallelepiped.CalcVolume()); Console.WriteLine("Diagonal XYZ = {0:f2}", parallelepiped.CalcDiagonalXYZ()); Console.WriteLine("Diagonal XY = {0:f2}", parallelepiped.CalcDiagonalXY()); Console.WriteLine("Diagonal XZ = {0:f2}", parallelepiped.CalcDiagonalXZ()); Console.WriteLine("Diagonal YZ = {0:f2}", parallelepiped.CalcDiagonalYZ()); }
static void Main() { Console.WriteLine(FileUtils.GetFileExtension("example")); Console.WriteLine(FileUtils.GetFileExtension("example.pdf")); Console.WriteLine(FileUtils.GetFileExtension("example.new.pdf") + "\n"); Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example")); Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example.pdf")); Console.WriteLine(FileUtils.GetFileNameWithoutExtension("example.new.pdf")); var pointA = new Point(1, -2); var pointB = new Point(3, 4); var pointC = new Point(-6, 4); Console.WriteLine("\nDistance in the 2D space = {0:f2}", GeometryUtils.CalcDistance2D(pointA, pointB)); Console.WriteLine("Distance in the 3D space = {0:f2}", GeometryUtils.CalcDistance3D(pointA, pointB, pointC)); var prism = new RectangularParallelepiped(3, 4, 5); Console.WriteLine("\nVolume = {0:f2}", prism.CalcVolume()); Console.WriteLine("Diagonal XYZ = {0:f2}", prism.CalcDiagonalXYZ()); Console.WriteLine("Diagonal XY = {0:f2}", prism.CalcDiagonalXY()); Console.WriteLine("Diagonal XZ = {0:f2}", prism.CalcDiagonalXZ()); Console.WriteLine("Diagonal YZ = {0:f2}", prism.CalcDiagonalYZ()); }