Hi,
I have an issue of the Single<TSource>()
Why I can't set the TSource of the a concrete type while the collection is the astract type. The following is the example of my question.
public abstract class TestBase
{
}
public class Test : TestBase
{
public string Code {get; set;}
}
public static void Main(string[] args)
{
List<TestBase> tests = new List<TestBase>();
tests.Add(new Test() { Code = "A"});
Test theTest = tests.Single<Test>();
}
Thanks
Jobria