Source/Csla/Serialization/Mobile/MobileFormatter.cs
/// <summary>
/// Serializes the object into a byte array.
/// </summary>
/// <param name="obj">
/// The object to be serialized, which must implement
/// IMobileObject.
/// </param>
/// <returns></returns>
Serializes the object into a byte array.
Serializes the object into a byte array .
public static byte[] Serialize(object obj)
    {
      using (var buffer = new System.IO.MemoryStream())
      {
        var formatter = new MobileFormatter();
        formatter.Serialize(buffer, obj);
        return buffer.ToArray();
      }
    }
public static byte [ ] Serialize ( object obj ) { using ( var buffer = new System . IO . MemoryStream ( ) ) { var formatter = new MobileFormatter ( ) ; formatter . Serialize ( buffer , obj ) ; return buffer . ToArray ( ) ; } }
Serializes the object into a byte array.
Serializes the object into a byte array .
None
obj
object
The object to be serialized, which must implement
IMobileObject.
The object to be serialized which must implement IMobileObject .