-- Add this Name Space
using System.Collections;
ArrayList Numbers = new ArrayList();
-- Add Value in Array List
Random Randomizer = new Random();
Int32 P1 = Randomizer.Next(25, 100);
Int32 P2 = Randomizer.Next(25, 100);
Int32 P3 = Randomizer.Next(25, 100);
Int32 P4 = Randomizer.Next(25, 100);
Numbers.Add(P1);
Numbers.Add(P2);
Numbers.Add(P3);
Numbers.Add(P4);
-- Get Max Number
Int32 MaxNumber = Numbers.Cast<Int32>().Max();
-- Get Min Number
Int32 MaxNumber = Numbers.Cast<Int32>().Min();
using System.Collections;
ArrayList Numbers = new ArrayList();
-- Add Value in Array List
Random Randomizer = new Random();
Int32 P1 = Randomizer.Next(25, 100);
Int32 P2 = Randomizer.Next(25, 100);
Int32 P3 = Randomizer.Next(25, 100);
Int32 P4 = Randomizer.Next(25, 100);
Numbers.Add(P1);
Numbers.Add(P2);
Numbers.Add(P3);
Numbers.Add(P4);
-- Get Max Number
Int32 MaxNumber = Numbers.Cast<Int32>().Max();
-- Get Min Number
Int32 MaxNumber = Numbers.Cast<Int32>().Min();
No comments :
Post a Comment