使用LINQ,从a List<int>,如何检索包含重复多次的条目及其值的列表?
我在C#中使用List.代码如下所述:
TestCase.cs
 public class TestCase
{
    private string scenarioID;
    private string error;
    public string ScenarioID
    {
        get
        {
            return this.scenarioID;
        }
        set
        {
            this.scenarioID = value;
        }
    }
    public string Error
    {
        get
        {
            return this.error;
        }
        set
        {
            this.error = value;
        }
    }
    public TestCase(string arg_scenarioName, string arg_error)
    {
        this.ScenarioID = arg_scenarioName;
        this.Error = arg_error;
    }
}
我创建的列表是:
private List<TestCase> GetTestCases()
    {
        List<TestCase> scenarios = new List<TestCase>();
        TestCase scenario1 = new TestCase("Scenario1", string.Empty);
        TestCase scenario2 = new TestCase("Scenario2", string.Empty); …