Created
September 30, 2018 21:19
-
-
Save ipvalverde/6bacb22660b531eafa19b5042cb0b1ba to your computer and use it in GitHub Desktop.
Read Console string converting to int array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int[] ar = Console.ReadLine() | |
| .Split(' ') | |
| .Where(token => !string.IsNullOrWhiteSpace(token)) | |
| .Select(token => Convert.ToInt32(token)) | |
| .ToArray(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment