What would be the quickest way to have a multivalue Tridion text field split into a comma separated string? In my case I am using C#, but I guess any other examples are welcome as well. This is the ugly and long way it seems:
var multiTextField = fields["multiTextField"] as TextField;
string multiCommaField = String.Empty;
for (int i = 0; i < multiTextField.Values.Count; i++)
{
multiCommaField += multiTextField.Values[i].ToString() + ",";
}
Edit: I am using .NET 3.5 and Tridion 2009 SP1
You can user LINQ:
Or in shorter (uglier) way: