Visual Studio C#7 suggestions

This commit is contained in:
Christopher F
2017-04-23 15:23:06 -04:00
parent 6000b15c4d
commit 431b7fbd9f
21 changed files with 80 additions and 165 deletions

View File

@@ -206,8 +206,7 @@ namespace Discord.Net.WebSockets
//Use the internal buffer if we can get it
resultCount = (int)stream.Length;
ArraySegment<byte> streamBuffer;
if (stream.TryGetBuffer(out streamBuffer))
if (stream.TryGetBuffer(out ArraySegment<byte> streamBuffer))
result = streamBuffer.Array;
else
result = stream.ToArray();