Data Types C#

using System;
using System.Globalization;
using System.Text;
public class MobileUtil
{
    public static string UnicodeToHex(char[] chars)
    {
        StringBuilder sb = new StringBuilder();
        foreach (char c in chars)
        {
            if (c < 0x80)
            {
                sb.Append(String.Format("{0:X2}", (int)c));
            }
            else
            {
                sb.Append(String.Format("{0:X4}", (int)c));
            }
        }
        return sb.ToString();
    }
}