示例#1
0
 public static void PopulateList(InputList inputList, int min, int max)
 {
     for (var i = min; i <= max; i++)
     {
         inputList.Add(i);
     }
 }
示例#2
0
文件: Program.cs 项目: elkiss/4NET
 public static void PopulateList(InputList inputList, int min, int max)
 {
     for (var i = min; i <= max; i++)
     {
         inputList.Add(i);
     }
 }
示例#3
0
文件: Program.cs 项目: elkiss/4NET
        static void Main(string[] args)
        {
            //On initialise la suite de nombre
            var numbers = new InputList(new List<int>());
            numbers.MemberAdded += numbers_memberadded;
            PopulateList(numbers, 1, 20);

            Console.ReadLine();
        }
示例#4
0
        static void Main(string[] args)
        {
            //On initialise la suite de nombre
            var numbers = new InputList(new List <int>());

            numbers.MemberAdded += numbers_memberadded;
            PopulateList(numbers, 1, 20);



            Console.ReadLine();
        }
示例#5
0
文件: Program.cs 项目: elkiss/4NET
 private static void numbers_memberadded(object sender, InputList.MemberAddedEventArgs e)
 {
     var output = "";
     if (e.MemberAdd % 3 == 0)
     {
         output += "fizz";
     }
     if (e.MemberAdd % 5 == 0)
     {
         output += "buzz";
     }
     if (string.IsNullOrEmpty(output))
     {
         output += e.MemberAdd;
     }
     Console.WriteLine(output);
 }