title: Serialzing Microsoft.Office.Interop.Outlook.Rule object
body: <p>So I'm looking for a way to serialize the outlook rules from within an Outlook-Addin.</p>
  
  <p>Getting the rules is quite simple</p>
  
  <pre><code>var rules = Application.Session.DefaultStore.GetRules();
  foreach (Outlook.Rule rule in rules)
  {
      //Serialize the rule
  }
  </code></pre>
  
  <p>but so far I haven't found any <code>OK</code> way to serialize the <code>Rule</code> object so that it can either be stored in a file or sent over the wire.</p>
  
  <p>The only way I can think of is to implement all the classes used within <code>Rule</code> and then copying elements to them one-by-one and then serialize those classes using either XML/JSON serializer. But the problem with this approach is that the number of nested classes is significantly high.
  Is there any simpler way to serilze the <code>Rule</code> COM object?</p>