Guys, I have a problem that I need some help with. I have two generic methods that will Serialize/Deserialize an object to and from it's xml equivalent.
However, I'd like to write a method in my base class that will "serialize" "myself." However, I can't determine a way to pass the "Type that I am" in the the generic type parameter. Here's an example of how I'm serializing and deserializing the object: Person p = New Person(); string xml = Serialization.GetSerializedXml<Person>(p); ... Person p = null; p = Serialization.GetDeserializedXml<Person>(xml); How can I do something similar to this: public class BaseClass{ ... public string Serialize(){ //This will not work return Serialization.GetSerializedXml<typeof(this)>(this); } } Thank you for any help or assistance, Mike =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com