I have one internal static class MyLists with a static member:
internal static ImmutableArray<string> MyList =
new ImmutableArray<string> { "asd", "qwe" };
In another public test class Tests I have a MyTest function which selects and compares the list.
[TestClass]
public class MyTests {
[TestMethod]
public void TestMyLists() {
var list = MyLists.MyList.Select(s => s + ".foo");
}
}
But, I get the following error:
Additional information: The type initializer for 'TestMyLists' threw an exception.
Object reference not set to an instance of an object.
When I debug I see the static ImmutableArray as value = Uninitialized. Why?