Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79250 --- shadow/79250 2006-09-01 15:36:45.000000000 -0400 +++ shadow/79250.tmp.27386 2006-09-01 15:36:45.000000000 -0400 @@ -0,0 +1,64 @@ +Bug#: 79250 +Product: Mono: Class Libraries +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: FileShare.Delete not accepted by System.IO.FileStream ctor + +Please fill in this template when reporting a bug, unless you know what you +are doing. +Description of Problem: + +FileStream..ctor performs this suspicious check: + + if ((share < FileShare.None) || (share > FileShare.ReadWrite)) + { + throw new ArgumentOutOfRangeException("share", "Enum value was +out of legal range."); + } + +FileShare.Delete happens to have the value 4, which is unfortunately +FileShare.ReadWrite (= 3) :) + +Steps to reproduce the problem: + +using System; +using System.IO; + +namespace ConsoleApplication1 +{ + class Program + { + static void Main(string[] args) + { + Stream s = new FileStream( + @"C:\Temp\test", + FileMode.Open, + FileAccess.Read, + FileShare.ReadWrite | FileShare.Delete); + } + } +} + + +Actual Results: +Unhandled Exception: System.ArgumentOutOfRangeException: Enum value was out +of legal range. +Parameter name: share + +Expected Results: +- + +How often does this happen? +Always. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
