[Mono-bugs] [Bug 649464] System.IO.File.ReadLines disposes the StreamReader in the middle of reading

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 27 01:03:23 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=649464

https://bugzilla.novell.com/show_bug.cgi?id=649464#c2


Matthew Gerber <gerber.matthew at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW
                 CC|                            |gerber.matthew at gmail.com
       InfoProvider|gerber.matthew at gmail.com    |

--- Comment #2 from Matthew Gerber <gerber.matthew at gmail.com> 2010-10-27 05:03:22 UTC ---
(In reply to comment #1)
> test.cs(7,61): error CS1061: 'System.Collections.Generic.IEnumerable<string>'
>         does not contain a definition for 'Count' and no extension method
>         'Count' accepting a first argument of type
>         'System.Collections.Generic.IEnumerable<string>' could be found (are
> you
>         missing a using directive or an assembly reference?)

You need to add "using System.Linq" to run my example. You should also be able
to reproduce the error by running a foreach over the result of ReadLines (e.g.,
foreach(string s in System.IO.File.ReadLines("somefile")){}).

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list