static void Main(string[] args) { Grid2D point = new Grid2D(100, 100, 18, 18); Console.WriteLine("\nPoint 1\n"); V5DataOnGrid a = new V5DataOnGrid("Pyatakov Nikita", DateTime.Now, point); Console.WriteLine("\n"); a.InitRandom(2, 15); Console.WriteLine(a.ToLongString()); V5DataCollection b = (V5DataCollection)a; Console.WriteLine(b.ToLongString()); Console.WriteLine("\nPoint 2\n"); V5MainCollection c = new V5MainCollection(); c.AddDefaults(); Console.WriteLine(c.ToString()); Console.WriteLine("\nPoint 3\n"); Vector2[] array; foreach (V5Data obj in c) { array = obj.NearEqual(2); for (int i = 0; i < array.Length; i++) { Console.WriteLine("[" + array[i].X + ", " + array[i].Y + "]"); } } Console.ReadKey(); }
static void Main(string[] args) { V5DataCollection a = new V5DataCollection("", DateTime.Now, "l_2.txt"); Console.WriteLine(a.ToLongString("f4")); V5MainCollection task2 = new V5MainCollection(); task2.AddDefaults(); Console.WriteLine(task2.ToString()); Vector2 p; p.X = 1; p.Y = 2; Console.WriteLine("MaxDistance"); Console.WriteLine(task2.MaxDistance(p).ToString("f4")); Console.WriteLine("MaxDistanceItem"); foreach (DataItem s1 in task2.MaxDistanceItems(p)) { Console.WriteLine(s1.ToString("f4")); } Console.WriteLine("DataItems"); foreach (DataItem s2 in task2.DataItems) { Console.WriteLine(s2.ToString()); } }