c# iterate over string

C#
// Regular Strings
string foo = "hello world", bar = string.Empty;

foreach(char c in foo){
    bar += c;
}

// StringBuilder
string foo = "hello world";
StringBuilder bar = new StringBuilder();

foreach (char c in foo)
{
    bar.Append(c);
}
Source

Also in C#: