SoapServices.IsClrTypeNamespace(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Boolean value that indicates whether the specified namespace is native to the common language runtime.
public:
static bool IsClrTypeNamespace(System::String ^ namespaceString);
public static bool IsClrTypeNamespace (string namespaceString);
static member IsClrTypeNamespace : string -> bool
Public Shared Function IsClrTypeNamespace (namespaceString As String) As Boolean
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.
// Determine whether an XML namespace represents a CLR namespace.
String^ clrNamespace = SoapServices::XmlNsForClrType;
if ( SoapServices::IsClrTypeNamespace( clrNamespace ) )
{
Console::WriteLine( L"The namespace {0} is a CLR namespace.",
clrNamespace );
}
else
{
Console::WriteLine( L"The namespace {0} is not a CLR namespace.",
clrNamespace );
}
// 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).