Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void test()
- {
- IEnumerable<bool> inputs = GetInputs();
- string cronweek = "";
- for (int i = 0; i < inputs.Count(); i++)
- {
- if (inputs.ElementAt(i))
- {
- cronweek += $"{i},";
- }
- }
- // 0,2,4,5,6,
- Console.WriteLine(cronweek);
- }
- public IEnumerable<bool> GetInputs()
- {
- return new[] { true, false, true, false, true, true, true };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement