private byte[] PeekContiguousBytesHelper(out uint outLength) { IntPtr cPtr = RakNetPINVOKE.CSharp_ByteQueue_PeekContiguousBytesHelper(swigCPtr, out outLength); int len = (int)outLength; if (len <= 0) { return(null); } byte[] returnBytes = new byte[len]; Marshal.Copy(cPtr, returnBytes, 0, len); return(returnBytes); }