[Solved] Static List in C#


Please try below code.
It might work for you.

Use predicate to find element from List.

public static class A
{
    public static readonly List<string> alist = new List<string>
    {
        //some big data about 70 rows
    };

    public struct astruct
    {
        public const string adata = "a data";
    }
}

public class B
{
    string s1 = A.astruct.adata;
    string s2 = A.alist.Find(m => m.Equals(A.astruct.adata));
}

3

solved Static List in C#