'c# - find a string from a nested list

I have the following nested structure.

List<SomeType> which has another list of List<AnotherType> which internally has an array of strings users.

public class SomeType
{
    public string EmployeeNo { get; set; }

    public List<AnotherType> AnotherType { get; set; }
}

public class AnotherType
{
    public string UserName { get; set; }

    public string[] Users { get; set; }
}

Lets say I want to search for a value in the array of string Users. How can I do that.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source