Use GetRange for subsets
[NovacoinLibrary.git] / Novacoin / ByteQueue.cs
index 813d187..5fd6923 100644 (file)
@@ -18,7 +18,6 @@
 
 using System;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Novacoin
 {
@@ -78,7 +77,7 @@ namespace Novacoin
                 throw new ByteQueueException("Unable to read requested amount of data.");
             }
 
-            byte[] result = Elements.Skip(Index).Take(Count).ToArray();
+            byte[] result = Elements.GetRange(Index, Count).ToArray();
             Index += Count;
 
             return result;
@@ -91,7 +90,7 @@ namespace Novacoin
                 throw new ByteQueueException("Unable to read requested amount of data.");
             }
 
-            byte[] result = Elements.Skip(Index).Take(Count).ToArray();
+            byte[] result = Elements.GetRange(Index, Count).ToArray();
 
             return result;
         }