Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

XsdDataContractImporter.CanImport Method (XmlSchemaSet, ICollection<XmlQualifiedName>)

Gets a value that indicates whether the specified set of types contained in an XmlSchemaSet can be transformed into CLR types generated into a CodeCompileUnit.

Namespace:  System.Runtime.Serialization
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

public bool CanImport(
	XmlSchemaSet schemas,
	ICollection<XmlQualifiedName> typeNames


Type: System.Xml.Schema.XmlSchemaSet

A XmlSchemaSet that contains the schemas to transform.

Type: System.Collections.Generic.ICollection<XmlQualifiedName>

An ICollection<T> of XmlQualifiedName that represents the set of schema types to import.

Return Value

Type: System.Boolean
true if the schemas can be transformed; otherwise, false.


The schemas or typeNames parameter is null.


A data contract involved in the import is invalid.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft