I am trying to Convert a List to an Array to add to my ArrayAdapter, but when I am trying to do that I get the error:
"Cannot implicitly convert type 'System.Collections.Generic.List[]' to 'string[]'"
This is my code:
List<ClassName> Names = new List<ClassName>();
foreach (var property in coinPropery)
{
var propertyList = JsonConvert.DeserializeObject<List<Names>>(property.ToString());
coins.AddRange(propertyList);
Console.WriteLine(Names);
}
string[] NamesArray = Names.InArray();
The code in my ClassName is:
public class ClassName
{
public string Name { get; set; }
}
What can I do?