SoapBase64Binary Class
Wraps an XSD base64Binary type.
Assembly: mscorlib (in mscorlib.dll)
For more information about XSD data types, see the "XML Data Types Reference" in the MSDN Library at http://msdn.microsoft.com/library.
The following code example shows how to use the members in the SoapBase64Binary class to convert between a SoapBase64Binary object and an XSD base64Binary 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 SoapBase64Binary object. // The string "AgMFBws=" is byte[]{ 2, 3, 5, 7, 11 } expressed in // Base 64 format. String^ xsdBase64Binary = L"AgMFBws="; SoapBase64Binary^ base64Binary = SoapBase64Binary::Parse( xsdBase64Binary ); // Print the value of the SoapBase64Binary object in XSD format. Console::WriteLine( L"The SoapBase64Binary object in XSD format is {0}.", base64Binary ); // Print the XSD type string of the SoapBase64Binary object. Console::WriteLine( L"The XSD type of the SoapBase64Binary " L"object is {0}.", base64Binary->GetXsdType() ); // Print the value of the SoapBase64Binary object. Console::Write( L"base64Binary.Value contains:" ); for ( int i = 0; i < base64Binary->Value->Length; ++i ) { Console::Write( L" {0}", base64Binary->Value[ i ] ); } Console::WriteLine(); // Print the XSD type string of the SoapBase64Binary class. Console::WriteLine( L"The XSD type of the class SoapBase64Binary " L"is {0}.", SoapBase64Binary::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 SoapBase64Binary object.
// The string "AgMFBws=" is byte[]{ 2, 3, 5, 7, 11 } expressed in
// Base 64 format.
String* xsdBase64Binary = S"AgMFBws=";
SoapBase64Binary* base64Binary =
SoapBase64Binary::Parse(xsdBase64Binary);
// Print the value of the SoapBase64Binary object in XSD format.
Console::WriteLine(S"The SoapBase64Binary object in XSD format is {0}.",
base64Binary);
// Print the XSD type string of the SoapBase64Binary object.
Console::WriteLine(S"The XSD type of the SoapBase64Binary "
S"object is {0}.", base64Binary->GetXsdType());
// Print the value of the SoapBase64Binary object.
Console::Write(S"base64Binary.Value contains:");
for (int i = 0 ; i < base64Binary->Value->Length ; ++i)
{
Console::Write(S" {0}", __box(base64Binary->Value[i]));
}
Console::WriteLine();
// Print the XSD type string of the SoapBase64Binary class.
Console::WriteLine(S"The XSD type of the class SoapBase64Binary "
S"is {0}.",
SoapBase64Binary::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.