summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/IO/BinaryWriter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/IO/BinaryWriter.cs')
-rw-r--r--src/mscorlib/src/System/IO/BinaryWriter.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mscorlib/src/System/IO/BinaryWriter.cs b/src/mscorlib/src/System/IO/BinaryWriter.cs
index f99b4d3d42..b6c562534c 100644
--- a/src/mscorlib/src/System/IO/BinaryWriter.cs
+++ b/src/mscorlib/src/System/IO/BinaryWriter.cs
@@ -26,7 +26,6 @@ namespace System.IO {
// give unique encodings.
//
[Serializable]
- [System.Runtime.InteropServices.ComVisible(true)]
public class BinaryWriter : IDisposable
{
public static readonly BinaryWriter Null = new BinaryWriter();
@@ -185,7 +184,7 @@ namespace System.IO {
Debug.Assert(_encoding.GetMaxByteCount(1) <= 16, "_encoding.GetMaxByteCount(1) <= 16)");
int numBytes = 0;
- fixed(byte * pBytes = _buffer) {
+ fixed(byte * pBytes = &_buffer[0]) {
numBytes = _encoder.GetBytes(&ch, 1, pBytes, _buffer.Length, flush: true);
}
OutStream.Write(_buffer, 0, numBytes);
@@ -382,7 +381,7 @@ namespace System.IO {
}
fixed (char* pChars = value)
{
- fixed (byte* pBytes = _largeByteBuffer)
+ fixed (byte* pBytes = &_largeByteBuffer[0])
{
byteLen = _encoder.GetBytes(pChars + charStart, charCount, pBytes, _largeByteBuffer.Length, charCount == numLeft);
}