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

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.Core/Extensions/StreamExtensions.cs')
-rw-r--r--UVtools.Core/Extensions/StreamExtensions.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/UVtools.Core/Extensions/StreamExtensions.cs b/UVtools.Core/Extensions/StreamExtensions.cs
index f85f917..c1404e0 100644
--- a/UVtools.Core/Extensions/StreamExtensions.cs
+++ b/UVtools.Core/Extensions/StreamExtensions.cs
@@ -19,11 +19,9 @@ namespace UVtools.Core.Extensions
/// <returns>Byte array data</returns>
public static byte[] ToArray(this Stream stream)
{
- using (var memoryStream = new MemoryStream())
- {
- stream.CopyTo(memoryStream);
- return memoryStream.ToArray();
- }
+ using var memoryStream = new MemoryStream();
+ stream.CopyTo(memoryStream);
+ return memoryStream.ToArray();
}
}
}