尝试序列化通用列表时出现以下错误“System.Reflection.RuntimeParameterInfo 由于其保护级别而无法访问。只能处理公共类型”
这是我下面的代码
XmlSerializer serializer = new XmlSerializer(typeof(List<System.Reflection.ParameterInfo>));
XDocument document = new XDocument();
using (XmlWriter xmlWriter = document.CreateWriter())
{
serializer.Serialize(xmlWriter, parameterList);
}
return document.Root.ToString();