Ad
  • Custom User Avatar

    Thanks for your feedback. I am a Ruby developer and i was a .net developer just trying to refresh my .net skills. Will change as per your comment.

  • Custom User Avatar

    As you are using Linq, you can use it to output the number in a single line without needing to create lists, you can find out if the number you are looking for is odd or even (integers.Where(x => x % 2 == 0).Count() > 1 ? 1 : 0) so if this is 1 then we look for odd and 0 for even, we can then find where a variable fits the criteria integers.Where(z => (z % 2 == (*that code snippit before*))) and get the only value .First();, so now we have odd if the only number is odd and even if the only number is even.

    Great start with Linq