IPacket.WriteChar 方法

更新:2007 年 11 月

向对象中写入一个字符。

命名空间:  Microsoft.SmartDevice.DeviceAgentTransport
程序集:  Microsoft.SmartDevice.DeviceAgentTransport(在 Microsoft.SmartDevice.DeviceAgentTransport.dll 中)

语法

声明
Sub WriteChar ( _
    in_wchar As Char _
)
用法
Dim instance As IPacket
Dim in_wchar As Char

instance.WriteChar(in_wchar)
void WriteChar(
    char in_wchar
)
void WriteChar(
    wchar_t in_wchar
)
function WriteChar(
    in_wchar : char
)

参数

  • in_wchar
    类型:System.Char

    要向数据包中写入的字符。

示例

    packet = PacketFactory.GetNewPacket()

    ' Write the version of .NET Compact Framework into the packet.
    packet.WriteString("Hello Desktop Computer")
    packet.WriteInt32(Environment.Version.Major)
    packet.WriteInt32(Environment.Version.Minor)
    packet.WriteInt32(Environment.Version.Build)
    packet.WriteInt32(Environment.Version.Revision)

    ' Pass the packet to desktop application.
    packetStream.Write(packet)

End Sub 'Main
packet = PacketFactory.GetNewPacket();

// Write the version of .NET Compact Framework into the packet.
packet.WriteString("Hello Desktop Computer");
packet.WriteInt32(Environment.Version.Major);
packet.WriteInt32(Environment.Version.Minor);
packet.WriteInt32(Environment.Version.Build);
packet.WriteInt32(Environment.Version.Revision);

// Pass the packet to desktop application.
packetStream.Write(packet);

权限

另请参见

参考

IPacket 接口

IPacket 成员

Microsoft.SmartDevice.DeviceAgentTransport 命名空间