anchor.diff:      let getValueTypeWriter (t : Type) = fun () ->
           if t.IsValueType then ValueTypeSerializer.getValueTypeWriter t else None
   
  +    /// Try to determine a member function 'ToXml'
  +    let getInstanceWriter (t : Type) = fun() ->
  +        match t.GetMethod(writerFuncName, instanceFlags, null, Type.EmptyTypes, null) |> Utils.toOption with
  +        | Some func ->
  +            (fun (w : TextWriter) x -> w.Write(func.Invoke(x, null))) |> Some
  +        | _ -> None
  +
  +    /// Try to determine a static function 'ToXml'
  +    let getStaticWriter (t : Type) = fun () ->
  +        match t.GetMethod(writerFuncName, staticFlags, null, [| t |], null) |> Utils.toOption with
  +        | Some func ->
  +            (fun (w : TextWriter) x -> w.Write(func.Invoke(null, [| x |]))) |> Some
  +        | _ -> None
  +
  +
       /// Build a PropertyWriterInfo object based on the
       /// specified PropertyInfo
       let rec buildPropertyWriterInfo (propInfo : PropertyInfo) =
  
positive.code: 
      open SharpXml.Attempt
      open SharpXml.Extensions
  
      let propertyCache = ref (Dictionary<Type, PropertyWriterInfo[]>())
      let serializerCache = ref (Dictionary<Type, WriterFunc>())
      let typeInfoCache = ref (Dictionary<Type, TypeInfo>())
  
      /// General purpose XML tags writer function
      let writeTag (w : TextWriter) (name : string) writeFunc (value : obj) =
          w.Write("<{0}>", name)
          writeFunc w value
          w.Write("</{0}>", name)
  
      /// Try to determine one of a special serialization
      /// function, i.e. Exception, Uri
  
negative.code:         if t.IsArray then
              if t = typeof<byte[]> then Some ValueTypeSerializer.writeBytes
              elif t = typeof<char[]> then Some ValueTypeSerializer.writeChars
              elif t = typeof<int[]> then Some ListSerializer.writeIntArray
              elif t = typeof<string[]> then Some ListSerializer.writeStrArray
              // other array types will be handled by the IEnumerable writer
              else None
          else None
  