C# BitArray save to or read from SQL Server Binary

100 views Asked by At

Current, converting c# BitArray to byte[] then save to SQL Server. Is there any way to save it directly?

var byteArray = new byte[625];
bitArray.CopyTo(byteArray, 0);
Save(byteArray);

As reading from Binary to BitArray, using byte[] to receive the value and then converting to BitArray. Any way direct?

0

There are 0 answers