return _Elements[_Index++];
}
+ public bool TryGet(ref byte Element)
+ {
+ if (_Elements.Count <= _Index)
+ {
+ return false;
+ }
+
+ Element = _Elements[_Index++];
+
+ return true;
+ }
+
public byte GetCurrent()
{
return _Elements[_Index];
return result;
}
+ public bool TryGet(int nCount, ref byte[] Elements)
+ {
+ if (Count - Index < nCount)
+ {
+ return false;
+ }
+
+ Elements = _Elements.GetRange(_Index, nCount).ToArray();
+ _Index += nCount;
+
+ return true;
+ }
+
public byte[] GetCurrent(int nCount)
{
Contract.Requires<ArgumentException>(Count - Index >= nCount, "nCount is greater than amount of elements.");
return result;
}
+ public bool TryGetCurrent(int nCount, ref byte[] Elements)
+ {
+ if (Count - Index < nCount)
+ {
+ return false;
+ }
+
+ Elements = _Elements.GetRange(_Index, nCount).ToArray();
+
+ return true;
+ }
+
/// <summary>
/// Current index value
/// </summary>