Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to get the deserialized root namespace string.

Status
Not open for further replies.

mheppler

Programmer
Feb 6, 2006
8
0
0
US
I have a serialized class (XmlSerializer) to a FileStream like so:

Serialization.XmlRootAttribute(Namespace="]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(Company))]
public partial class Company
{ ...

I deserialize like so:
Company comp = (Company)xmlSer.Deserialize(fstream);

How can I get the Namespace string?

I was messing around with XmlRootAttribute.GetCustomAttribute but I'm out in the weeds with the args for this.

Thanks a lot, Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top