BitSharper.Script.GetData C# (CSharp) Method

GetData() private method

private GetData ( int len ) : byte[]
len int
return byte[]
        private byte[] GetData(int len)
        {
            try
            {
                var buf = new byte[len];
                Array.Copy(_program, _cursor, buf, 0, len);
                _cursor += len;
                return buf;
            }
            catch (IndexOutOfRangeException e)
            {
                // We want running out of data in the array to be treated as a recoverable script parsing exception,
                // not something that abnormally terminates the app.
                throw new ScriptException("Failed read of " + len + " bytes", e);
            }
        }