Sharpcraft.Steam.SteamUtils.StringToByte C# (CSharp) Method

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[]
        internal static byte[] StringToByte(string source)
        {
            return new UTF8Encoding().GetBytes(source);
        }

Usage Example

Beispiel #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);
 }
All Usage Examples Of Sharpcraft.Steam.SteamUtils::StringToByte