I have classes generated from xsd that i would like to use to create an xml to send over the wire. I just want to create the document in memory, convert it to string/byte[] and send it. I was under the impression that once the classes are populated, i could just do a tostring() and it would return the entire document out. That doesn't seem to be the case... What am i doing wrong here?
@event myEvent = new @event();
myEvent.name = "AddProgram";
myEvent.version = 8.0M;
DateTime myDateTime = new DateTime();
myDateTime = DateTime.Now;
myEvent.time = myDateTime;
detail myDetail = new detail();
myDetail.name = "Program1"
myEvent.detail = myDetail;
Controller controller = new Controller();
controller.actionSpecified = true;
controller.action = ControllerAction.Create;
myDetail.Controller = controller;
String xmlString = myEvent.ToString(); //this is where i would expect a string.
all i get out of this is: "event"