S7NetPlus / s7netplus

S7.NET+ -- A .NET library to connect to Siemens Step7 devices
MIT License
1.32k stars 586 forks source link

add Read/WriteBytes(Async) overloads accepting Span<byte>/Memory<byte> for .NET5 or greater #482

Closed ArgusMagnus closed 1 year ago

ArgusMagnus commented 1 year ago

I have added overloads to ReadBytes, WriteBytes and their async counterparts which accept Span<byte> and the like. For now the overloads are only added for .NET 5 or greater. They could be made available for all frameworks by referencing the System.Memory package.