[Mono-devel-list] Hangs on System.IO.MonoIO:Write

Paul paul at all-the-johnsons.co.uk
Mon Aug 1 10:25:23 EDT 2005


Hi,

> 		foreach (SearchResult lResult in lResults)
> 		{
> 			if (lResult.Properties["mail"] != null)
> 				foreach (String item in
> lResult.Properties["mail"])
> 				{
> 					if
> (item.IndexOf("wardandsmith.com") > 0)
> 	
> //Console.WriteLine(item);
> 	
> file.WriteLine(item.ToLower());
> 				}
> 		}
> 	} 
> 	catch (Exception exc)
> 	{
> 		Console.WriteLine("ERRNUM: " + exc.Message);
> 		Console.WriteLine("ERRNUM: " + exc.InnerException);
> 		Console.WriteLine("ERRNUM: " + exc.Source);
> 		Console.WriteLine("ERRNUM: " + exc.StackTrace);		
> 	}			
> 	file.Close();
> }
> 
> 
> The very last line in the code is where the Close() call is. If you can
> find anything wrong, I'd be very grateful!

By the looks of it, the problem is the read routine more than anything
as it looks like you may be reading past the end of the file which means
the close at the end generates an error.

TTFN

Paul
-- 
"Some people will do anything for a woman in uniform" - The Doctor -
Unregenerate (Big Finish audio)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050801/54dedd49/attachment.bin 


More information about the Mono-devel-list mailing list