0

I have this code that returns a List

   var addRoles = newRoles
      .Where(x => oldRoles
      .All(y => y != x))
      .ToList();

I am using this in a method however the method requires a string array:

string[]

How can I make the addRoles variable into a string array?

1
  • addRoles.ToArray()... Commented Jul 5, 2014 at 5:52

1 Answer 1

2

Use ToArray()

var addRoles = newRoles
      .Where(x => oldRoles
      .All(y => y != x))
      .ToArray();
Sign up to request clarification or add additional context in comments.

Comments