Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Palo <ville@mono-cvs.ximian.com>2003-04-19 06:17:25 +0400
committerVille Palo <ville@mono-cvs.ximian.com>2003-04-19 06:17:25 +0400
commitf40f59cdc54759e9a730a388b6f5f1bd250f0174 (patch)
tree0a652116725db21e63998c9194e4e53bf530c929 /mcs/class/corlib/System.IO/MemoryStream.cs
parentf987c87f6eecb4e510b348cb56c7b003f7daf18e (diff)
2003-04-19 Ville Palo <vi64pa@kolumbus.fi>
* BufferedStream.cs: Some fixes, mostly throwing exceptions. * MemoryStream.cs: Changed the order of exception checking * StringReader.cs: little clean up svn path=/trunk/mcs/; revision=13798
Diffstat (limited to 'mcs/class/corlib/System.IO/MemoryStream.cs')
-rw-r--r--mcs/class/corlib/System.IO/MemoryStream.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.IO/MemoryStream.cs b/mcs/class/corlib/System.IO/MemoryStream.cs
index d7aa2bf48ad..007809bd3ad 100644
--- a/mcs/class/corlib/System.IO/MemoryStream.cs
+++ b/mcs/class/corlib/System.IO/MemoryStream.cs
@@ -284,10 +284,11 @@ namespace System.IO
public override void SetLength (long value)
{
- CheckIfClosedThrowDisposed ();
if (!expandable && value > capacity)
throw new NotSupportedException ("Expanding this MemoryStream is not supported");
+ CheckIfClosedThrowDisposed ();
+
if (!canWrite)
throw new IOException ("Cannot write to this MemoryStream");