MergeSynchronizationAgent.ComErrorCollection Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of errors generated by the replication agent.
public:
virtual property System::Collections::IEnumerable ^ ComErrorCollection { System::Collections::IEnumerable ^ get(); };
public virtual System.Collections.IEnumerable ComErrorCollection { get; }
member this.ComErrorCollection : System.Collections.IEnumerable
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable
Property Value
A IEnumerable collection of ComErrorRecord objects.
Implements
Examples
The following example shows how to iterate through the returned error collection after an agent is run.
[C#]
foreach (ComErrorRecord errorRecord in agent.ComErrorCollection)
{
WriteLog("[ERROR: " + errorRecord.ErrorNumber +
errorRecord.Description + "]");
}
Remarks
To view all agent errors, you must iterate through the collection of ComErrorRecord objects.