Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (StreamReader reader = new StreamReader(filename, Encoding.UTF8, true))
- {
- bool canBreak = false;
- token.Register(() => canBreak = true);
- string rowasis = await reader.ReadLineAsync();
- while ((rowasis = await reader.ReadLineAsync()) != null)
- {
- if (canBreak == true)
- {
- token.ThrowIfCancellationRequested();
- }
- string[] row = rowasis.Split(';');
- Debug.WriteLine(string.Format("{0}", row));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement