Merge pull request #439 from mono-soc-2012/garyb/iconfix
[mono.git] / mcs / class / System / System.Net / OpenReadCompletedEventArgs.cs
index 6fa84b165f445d212ffddae12a2729fb76215bab..6bf153853e5272a879af9e340b0afdc3bba5b111 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //     Atsushi Enomoto  <atsushi@ximian.com>
 //
-// (C) 2006 Novell, Inc. (http://www.novell.com)
+// Copyright (C) 2006,2009 Novell, Inc (http://www.novell.com)
 //
 
 //
@@ -27,7 +27,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
 
 using System.ComponentModel;
 using System.IO;
@@ -36,8 +35,7 @@ namespace System.Net
 {
        public class OpenReadCompletedEventArgs : AsyncCompletedEventArgs
        {
-               internal OpenReadCompletedEventArgs (Stream result,
-                       Exception error, bool cancelled, object userState)
+               internal OpenReadCompletedEventArgs (Stream result, Exception error, bool cancelled, object userState)
                        : base (error, cancelled, userState)
                {
                        this.result = result;
@@ -46,9 +44,13 @@ namespace System.Net
                Stream result;
 
                public Stream Result {
-                       get { return result; }
+                       get {
+#if NET_2_1
+                               RaiseExceptionIfNecessary ();
+#endif
+                               return result;
+                       }
                }
        }
 }
 
-#endif