View difference between Paste ID: CfDfsE7L and ZC1fr0GQ
SHOW: | | - or go back to the newest paste.
1
public void test()
2
        {
3
            IEnumerable<bool> inputs = GetInputs();
4
5
            string cronweek = "";
6
7
            for (int i = 0; i < inputs.Count(); i++)
8
            {
9
                if (inputs.ElementAt(i))
10
                {
11
                    cronweek += $"{i},";
12
                }
13
            }
14
			
15
			// 0,2,4,5,6,
16
            Console.WriteLine(cronweek);
17
			
18
        }
19
20
        public IEnumerable<bool> GetInputs()
21
        {
22
            return new[] { true, false, true, false, true, true, true };
23
        }