PipeMessage.EncodeString
Encodes a string into MsgData and sets MsgCode to '0'.
Remarks
Any MsgData already in the message is replaced.
Syntax
| Syntax | Description |
|---|---|
| EncodeString(string str) | Encoder method to convert any string into the byte[] MsgData. Note that the MsgCode is automatically set to ‘0’, which is reserved for string data. |
Parameters
| Name | Type | Description |
|---|---|---|
| str | string | The string to be encoded. |
Example
1
2
3
4
5
using Nova.IPC.Pipes;
PipeMessage message = new PipeMessage();
message.EncodeString("Hello!");
Console.WriteLine(message.MsgCode); // 0
This post is licensed under CC BY 4.0 by the author.