I want to check a particular role by looping through an array. if the role matches then I set the value to true else I return false. This I am doing by using foreach loop, instead I want to use LINQ. how to do it?
foreach( var role in Roles)
if ( role == "student")
isStudent = true;
Instead of using foreach above I would like to use LINQ, how to use it?