ok Me doy por vencido, ¿cómo se hace esto en una línea?Cómo convertir el objeto [] a la lista <string> en una línea de C# 3.0?
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
//List<string> fields = values.ToList<string>();
//List<string> fields = values as List<string>;
//List<string> fields = (List<string>)values;
List<string> fields = new List<string>();
foreach (object value in values)
{
fields.Add(value.ToString());
}
//process the fields here knowning they are strings
...
}
Técnicamente es C# 3.0, que se puede utilizar para atacar .NET frameworks 2.0, 3.0 o 3.5 en VS2008. Confuso, lo sé :) – Lucas
correcto, gracias –