SoapBase64Binary 类

定义

包装 XSD base64Binary 类型。Wraps an XSD base64Binary type.

public ref class SoapBase64Binary sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapBase64Binary : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapBase64Binary : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapBase64Binary = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapBase64Binary = class
    interface ISoapXsd
Public NotInheritable Class SoapBase64Binary
Implements ISoapXsd
继承
SoapBase64Binary
属性
实现

示例

下面的代码示例演示如何使用类中的成员在 SoapBase64Binary SoapBase64Binary 对象和 XSD 字符串之间进行转换 base64BinaryThe 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 System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // 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 = "AgMFBws=";
        SoapBase64Binary base64Binary =
            SoapBase64Binary.Parse(xsdBase64Binary);

        // Print the value of the SoapBase64Binary object in XSD format.
        Console.WriteLine("The SoapBase64Binary object in XSD format is {0}.",
            base64Binary.ToString());

        // Print the XSD type string of the SoapBase64Binary object.
        Console.WriteLine("The XSD type of the SoapBase64Binary " +
            "object is {0}.", base64Binary.GetXsdType());

        // Print the value of the SoapBase64Binary object.
        Console.Write("base64Binary.Value contains:");
        for (int i = 0 ; i < base64Binary.Value.Length ; ++i)
        {
            Console.Write(" " + base64Binary.Value[i]);
        }
        Console.WriteLine();

        // Print the XSD type string of the SoapBase64Binary class.
        Console.WriteLine("The XSD type of the class SoapBase64Binary " +
            "is {0}.",
            SoapBase64Binary.XsdType);
    }
}

注解

有关 XSD 数据类型的详细信息,请参阅 XML 数据类型参考For more information about XSD data types, see the XML Data Types Reference.

构造函数

SoapBase64Binary()

初始化 SoapBase64Binary 类的新实例。Initializes a new instance of the SoapBase64Binary class.

SoapBase64Binary(Byte[])

使用 64 位数字的二进制表示形式初始化 SoapBase64Binary 类的新实例。Initializes a new instance of the SoapBase64Binary class with the binary representation of a 64-bit number.

属性

Value

获取或设置 64 位数字的二进制表示形式。Gets or sets the binary representation of a 64-bit number.

XsdType

获取当前 SOAP 类型的 XML 架构定义语言 (XSD)。Gets the XML Schema definition language (XSD) of the current SOAP type.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetXsdType()

返回当前 SOAP 类型的 XML 架构定义语言 (XSD)。Returns the XML Schema definition language (XSD) of the current SOAP type.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Parse(String)

将指定的 String 转换为 SoapBase64Binary 对象。Converts the specified String into a SoapBase64Binary object.

ToString()

返回 Value 作为 StringReturns Value as a String.

适用于