XmlSerializer won't serialize IEnumerable
问题 I have an invocation logger that is intended to record all method calls along with the parameters associated with the method using XmlSerializer. It works well for most of the calls, but it throws an exception for all methods that has a parameter of IEnumerable type. For example, void MethodWithPlace( Place value ) would be serialized, but void MethodWithPlace( IEnumerable<Place> value ) would not. The exception is System.NotSupportedException: Cannot serialize interface System.Collections