I am using protobuf for serialisation to String. I have a report object to be passed to highchart template which I need to serialise to String. I am getting index out of bound exception while doing so. Please let me know why I am getting so. I am having one report object.
var report = new List<ReportViewModel>();
report = CalculateOutputHelper.ConstructOverview(Convert.ToInt32(testId), eventName);
using (MemoryStream stream = new MemoryStream())
{
Serializer.Serialize(stream, report);
var tempOutPut = Convert.ToBase64String(stream.ToArray());
return tempOutPut;
}