Created
May 23, 2011 11:01
-
-
Save StephenRedd/986546 to your computer and use it in GitHub Desktop.
blog: Fail Loop
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
| using (FileStream rdr = new FileStream(contentInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) | |
| { { | |
| index = 1; | |
| while (true) | |
| { | |
| long offset = (index - 1) * chunkSize; | |
| long remaining = contentInfo.Length - offset; | |
| if (remaining < 1) break; // Stop processing, at the end of the file | |
| // stuff that doesn't ever touch the index variable | |
| index++; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment