예제 #1
0
        public static void Run()
        {
            var sample = new DataSamples(8);

            sample[0] = new Measurements(50, 60, 1.5);
            sample[1] = new Measurements(20, 30, 1.5);
            sample[2] = new Measurements(20, 30, 1.5);
            sample[3] = new Measurements(80, 10, 1.5);
            sample[4] = new Measurements(50, 15, 1.5);
            sample[5] = new Measurements(20, 30, 1.5);
            sample[6] = new Measurements(20, 30, 1.5);
            sample[7] = new Measurements(20, 30, 1.5);

            var people = new People(new Person[] { new Person("Jose"), new Person("Amanda"), new Person("Carlos") });

            Console.WriteLine($"Person 1: {people[0].Name}");
            Console.WriteLine($"Person 2: {people[1].Name}");
            Console.WriteLine($"Person 3: {people[2].Name}");
        }
예제 #2
0
            public Page(int startingIndex, int length)
            {
                this.startingIndex = startingIndex;
                this.length        = length;
                lastAccess         = DateTime.Now;

                // This stays as random stuff:
                var generator = new Random();

                for (int i = 0; i < length; i++)
                {
                    var m = new Measurements
                    {
                        HiTemp      = generator.Next(50, 95),
                        LoTemp      = generator.Next(12, 49),
                        AirPressure = 28.0 + generator.NextDouble() * 4
                    };
                    pageData.Add(m);
                }
            }