StringToByte() static private method

Convert a string to a byte array.
static private StringToByte ( string source ) : byte[]
source string The string to convert.
return byte[]
示例#1
0
 /// <summary>
 /// Send a message to this friend.
 /// </summary>
 /// <param name="message">Message to send.</param>
 public void SendMessage(string message)
 {
     byte[] msg = SteamUtils.StringToByte(message);
     SteamManager.Friends.SendMsgToFriend(SteamID, EChatEntryType.k_EChatEntryTypeChatMsg, msg, msg.Length);
 }
示例#2
0
 /// <summary>
 /// Send an emote to this friend.
 /// </summary>
 /// <param name="emote">Emote to send.</param>
 /// <remarks>This will appear in the target's chatlog as "&lt;user&gt; &lt;emote&gt;.</remarks>
 public void SendEmote(string emote)
 {
     byte[] em = SteamUtils.StringToByte(emote);
     SteamManager.Friends.SendMsgToFriend(SteamID, EChatEntryType.k_EChatEntryTypeEmote, em, em.Length);
 }