public static void Main()
string camelCase = "CamelCase";
string newCamelCase= HiffenCamelCase(camelCase);
Console.WriteLine(camelCase);
Console.WriteLine(newCamelCase);
static string HiffenCamelCase(string s)
if (!String.IsNullOrEmpty(s))
string result = s[0].ToString();
for (int i = 1; i < s.Length;i++)
result += s[i]+ (i+1<s.Length ? (Char.IsUpper(s[i+1]) ?"-" : "") : "");