This documentation is archived and is not being maintained.
SoapNormalizedString Class
Visual Studio 2010
Wraps an XML normalizedString type.
Assembly: mscorlib (in mscorlib.dll)
The SoapNormalizedString type exposes the following members.
| 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.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetXsdType | Returns the XML Schema definition language (XSD) of the current SOAP type. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Parse | 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 ); }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
