Correct the virtual overload of Stream.CopyTo (dotnet/coreclr#7082)
authorJames Ko <jamesqko@gmail.com>
Wed, 7 Sep 2016 13:01:33 +0000 (09:01 -0400)
committerJan Kotas <jkotas@microsoft.com>
Wed, 7 Sep 2016 13:01:33 +0000 (06:01 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/ef5ceb0b52e3a34f614ab8fd943678b5e1ed1bd1

src/coreclr/src/mscorlib/src/System/IO/Stream.cs

index 9d60f4a..a1f2936 100644 (file)
@@ -186,7 +186,7 @@ namespace System.IO {
         // Reads the bytes from the current stream and writes the bytes to
         // the destination stream until all bytes are read, starting at
         // the current position.
-        public virtual void CopyTo(Stream destination)
+        public void CopyTo(Stream destination)
         {
             int bufferSize = _DefaultCopyBufferSize;
 
@@ -214,7 +214,7 @@ namespace System.IO {
             CopyTo(destination, bufferSize);
         }
 
-        public void CopyTo(Stream destination, int bufferSize)
+        public virtual void CopyTo(Stream destination, int bufferSize)
         {
             ValidateCopyToArguments(destination, bufferSize);