SoapNormalizedString Class
Wraps an XML normalizedString type.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | SoapNormalizedString() | Initializes a new instance of the SoapNormalizedString class. |
![]() | SoapNormalizedString(String^) | Initializes a new instance of the SoapNormalizedString class with a normalized string. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | GetXsdType() | Returns the XML Schema definition language (XSD) of the current SOAP type. |
![]() ![]() | Parse(String^) | Converts the specified String into a SoapNormalizedString object. |
![]() | ToString() | Returns Value as a String.(Overrides Object::ToString().) |
The following code example shows how to use the members in the SoapNormalizedString class to convert between a SoapNormalizedString object and an XSD normalizedString.
#using <System.Runtime.Remoting.dll> using namespace System; using namespace System::Runtime::Remoting::Metadata::W3cXsd2001; static void TestParse( String^ testString ) { try { // Parse the test string. SoapNormalizedString^ normalized = SoapNormalizedString::Parse( testString ); // Report that the parse succeeded if no exception was thrown. Console::WriteLine( L"Parse succeeded on the string \"{0}\".", testString ); // Print the string representation of the object. Console::WriteLine( L"The normalized value of this string is \"{0}\".", normalized ); // Print the XSD type of the object. Console::WriteLine( L"The XSD type of the SoapNormalizedString object is {0}.", normalized->GetXsdType() ); // Print the value of the SoapNormalizedString object. Console::WriteLine( L"The value of the SoapNormalizedString object is \"{0}\".", normalized->Value ); } catch ( System::Runtime::Remoting::RemotingException^ e ) { // Report the details of the exception that was thrown. Console::WriteLine( L"Parse failed on the string \"{0}\".", testString ); Console::WriteLine( e->Message ); } } int main() { // Create strings to test the Parse method. String^ stringWithSpaces = L"one two"; String^ stringWithSpacesAndTabs = L"one two\t"; String^ stringWithSpacesAndLineFeed = L"one two\n"; String^ stringWithSpacesAndCarriageReturn = L"one two\r"; // Test the Parse method with each string. TestParse( stringWithSpaces ); TestParse( stringWithSpacesAndTabs ); TestParse( stringWithSpacesAndLineFeed ); TestParse( stringWithSpacesAndCarriageReturn ); // Print the XSD type string of the SoapNormalizedString class. Console::WriteLine( L"The XSD type of the SoapNormalizedString class is {0}.", SoapNormalizedString::XsdType ); }
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


