C# xNet HttpRequest

How can I do this in openbullet 2

public static byte[] StringToByteArray(string hex)
            {
                return Enumerable.Range(0, hex.Length)
                    .Where(x => x % 2 == 0)
                    .Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
                    .ToArray();
            }

            string _emailLength = Convert.ToString(email.Length, 16);
            string _passLength = Convert.ToString(password.Length, 16);

            if (_emailLength.Length == 1)
            {
                _emailLength = "0" + _emailLength;
            }

            if (_passLength.Length == 1)
            {
                _passLength = "0" + _passLength;
            }

You know you can write C# in OB2 right? xD
You can write it in the LoliCode section, and mix’n’match with blocks. If you don’t have a namespace that you need, just import it above the editor (there is a toggle to show the textbox).