public void ExportXSDUsingDataContractExporter()
{
//create schema
XsdDataContractExporter _exporter = new XsdDataContractExporter();
Type _ConfigurationDataType = typeof(ConfigurationData);
Assert.IsTrue(_exporter.CanExport(_ConfigurationDataType));
_exporter.Export(_ConfigurationDataType);
Console.WriteLine("number of schemas: {0}", _exporter.Schemas.Count);
Console.WriteLine();
//write out the schema
XmlSchemaSet _Schemas = _exporter.Schemas;
XmlQualifiedName XmlNameValue = _exporter.GetRootElementName(_ConfigurationDataType);
string EmployeeNameSpace = XmlNameValue.Namespace;
foreach (XmlSchema _schema in _Schemas.Schemas(EmployeeNameSpace))
_schema.Write(Console.Out);
}