public byte[] uploadPic(int userID, string fileName) { FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); int imgLen = (int)fs.Length; byte[] B = new byte[imgLen + 1]; fs.Read(B, 0, imgLen); fs.Dispose(); user.uploadPic(userID, B); return(B); }