You can use XMLSerializer class for achieving this.
XmlSerializer serializer = new XmlSerializer(typeof(YourCustomClass[]));
StreamWriter writer = new StreamWriter()
serializer.Serialize(writer, objectOfCustomClass);
string xmlString = writer.ToString();