I have an ObservableCollection<Employee> how do I convert it into byte array[]?
The class Employee consists of, - EmployeeId - DateOfJoining - Age - Salary
The service I need to pass the collection to is expecting the data to be in byte[].
What would be an efficient way to convert observableCollection to byte[]?
Or do I just need to loop through the collection to create a byte array?
The service I need to pass the collection to is expecting the data to be in byte[]In what format/protocol? BinaryFormatter is only one of the many alternatives. for ex, int i = 1; binaryWriter.Write(i); or Encoding.ASCII.GetBytes(i.ToString());