-5
public IEnumerable<Employee> Filter(List<String> civstat)
{
  string[] civil_status = new string[] { civstat };
}

How to convert the List parameter to a string?

2 Answers2

0

If u want to convert a List into a string try this :

Convert a list to a string in C#

If u want to convert a List into a string array (string[])

use

civstat.ToArray();
Community
  • 1
  • 1
Shiglet
  • 109
  • 9
0

civstat.ToArray();

https://msdn.microsoft.com/de-de/library/x303t819(v=vs.110).aspx

Took 1 sec to google

Klaus
  • 1
  • 1
  • 1
    The question was how to convert a `List` to a `string`, you are converting a `List` to `string[]` – Alex Feb 23 '17 at 08:57
  • @Alex, the question title and example code ask very different things. That's just a case where the question is shit and shouldn't be answered until clear. – Joey Feb 23 '17 at 09:54