This is not my code. I am supposed to figure out what is going on. The line of the while statement is where I am confused. Is all its trying to say is read until end of file. I don't understand how it would evaluate to some integer for comparison.
using (FileStream fs = File.Open(pathToPK, FileMode.Open))
{
BinaryReader br = new BinaryReader(fs);
using (MemoryStream ms = new MemoryStream())
{
byte[] buffer = new byte[1024];
int read = 0;
while ((read = br.Read(buffer, 0, 1024)) > 0) //don't understand this line
{
ms.Write(buffer, 0, read);
}
sk = new byte[ms.ToArray().Length]; //sk is a byte[]
ms.ToArray().CopyTo(sk, 0);
}
}