SoapHexBinary Class
Wraps an XSD hexBinary type.
Assembly: mscorlib (in mscorlib.dll)
The following code example shows how to use the members in the SoapHexBinary class to convert between a SoapHexBinary object and an XSD hexBinary string.
#using <System.dll> #using <System.Runtime.Remoting.dll> using namespace System; using namespace System::Runtime::Remoting::Metadata::W3cXsd2001; int main() { // Parse an XSD formatted string to create a SoapHexBinary object. String^ xsdHexBinary = L"3f789ABC"; SoapHexBinary^ hexBinary = SoapHexBinary::Parse( xsdHexBinary ); // Print the value of the SoapHexBinary object in XSD format. Console::WriteLine( L"The SoapHexBinary object in XSD format is {0}.", hexBinary ); // Print the XSD type string of this particular SoapHexBinary object. Console::WriteLine( L"The XSD type of the SoapHexBinary object is {0}.", hexBinary->GetXsdType() ); // Print the value of the SoapHexBinary object. Console::Write( L"hexBinary.Value contains:" ); for ( int i = 0; i < hexBinary->Value->Length; ++i ) { Console::Write( L" {0}", hexBinary->Value[ i ] ); } Console::WriteLine(); // Print the XSD type string of the SoapHexBinary class. Console::WriteLine( L"The XSD type of the class SoapHexBinary is {0}.", SoapHexBinary::XsdType ); }
#using <mscorlib.dll>
#using <System.dll>
#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;
int main()
{
// Parse an XSD formatted string to create a SoapHexBinary object.
String* xsdHexBinary = S"3f789ABC";
SoapHexBinary* hexBinary = SoapHexBinary::Parse(xsdHexBinary);
// Print the value of the SoapHexBinary object in XSD format.
Console::WriteLine(S"The SoapHexBinary object in XSD format is {0}.",
hexBinary);
// Print the XSD type string of this particular SoapHexBinary object.
Console::WriteLine(
S"The XSD type of the SoapHexBinary object is {0}.",
hexBinary->GetXsdType());
// Print the value of the SoapHexBinary object.
Console::Write(S"hexBinary.Value contains:");
for (int i = 0 ; i < hexBinary->Value->Length ; ++i)
{
Console::Write(S" {0}", __box(hexBinary->Value[i]));
}
Console::WriteLine();
// Print the XSD type string of the SoapHexBinary class.
Console::WriteLine(S"The XSD type of the class SoapHexBinary is {0}.",
SoapHexBinary::XsdType);
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Community Additions
Show: