title: Catch XML with custom Classes
body: <p>I have so many clases, but I want to catch the sent and the recived information via XML ... The thing is that I don't want to create a Serializer every time i catch an XML doc, so I want to ask you if anyone know how to pack a class type into a TypeOf()</p>
  
  <p>Im trying to create a function that Works something like this:</p>
  
  <pre><code>public void createXML(string fileName, string route)
      {
          System.Xml.Serialization.XmlSerializer serializador = new System.Xml.Serialization.XmlSerializer(typeof(THIS IS WHAT I WANNA CHANGE TO A VARIABLE PARAMETER));
          System.IO.FileStream stream = new System.IO.FileStream(@""+ route + fileName + ".xml", System.IO.FileMode.Create);
      }
  </code></pre>
  
  <p>So what I want to do is to call this function and créate an XML whenever I want, but the thing is that inside the TypeOf() command, I can't figure out a way to put different classes there.</p>