namespace S7.Net.Types { /// /// Contains the methods to convert from S7 strings to C# strings /// public class String { /// /// Converts a string to S7 bytes /// public static byte[] ToByteArray(string value) { return System.Text.Encoding.ASCII.GetBytes(value); } /// /// Converts S7 bytes to a string /// /// /// public static string FromByteArray(byte[] bytes) { return System.Text.Encoding.ASCII.GetString(bytes); } } }