VCSJones.FiddlerCert.Interop.LocalBufferSafeHandle.CopyTo C# (CSharp) Method

CopyTo() public method

public CopyTo ( byte buffer, int offset, int length = null ) : void
buffer byte
offset int
length int
return void
        public void CopyTo(byte[] buffer, int offset = 0, int? length = null)
        {
            if (IsClosed || IsInvalid)
            {
                throw new InvalidOperationException("Handle is closed or invalid.");
            }
            var len = length ?? buffer.Length;
            Marshal.Copy(handle, buffer, offset, len);
        }