ok mi arrendo, come si fa in una riga?Come convertire oggetto [] in lista <string> in una riga di 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
...
}
Tecnicamente è C# 3.0, che può essere utilizzato per il targeting di framework .NET 2.0, 3.0 o 3.5 in VS2008. Confondendo, lo so :) – Lucas
corretto, grazie –