SoapServices.IsClrTypeNamespace(String) Method

Definition

Returns a Boolean value that indicates whether the specified namespace is native to the common language runtime.

C#
public static bool IsClrTypeNamespace(string namespaceString);

Parameters

namespaceString
String

The namespace to check in the common language runtime.

Returns

true if the given namespace is native to the common language runtime; otherwise, false.

Exceptions

The immediate caller does not have infrastructure permission.

Examples

The following code example shows how to use this method. This code example is part of a larger example provided for the SoapServices class.

C#
// Determine whether an XML namespace represents a CLR namespace.
string clrNamespace = SoapServices.XmlNsForClrType;
if (SoapServices.IsClrTypeNamespace(clrNamespace))
{
    Console.WriteLine(
        "The namespace {0} is a CLR namespace.",
        clrNamespace);
}
else 
{
    Console.WriteLine(
        "The namespace {0} is not a CLR namespace.",
        clrNamespace);
}

Remarks

The current method is used by the SoapSuds tool to determine whether an XML namespace represents a common language runtime type or a type from a non-common language runtime system.

For more information about SoapSuds, see Soapsuds Tool (Soapsuds.exe).

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1