在c#列表中所有属性和嵌套属性中搜索值

问题描述 投票:-1回答:1

我有一个具有以下属性的对象,其中

class A{
string name1{get;set;
string name2{get;set;}
List<B> b {get;set;}
}

class B{
string name{get;set;
}

我想查找是否在[]中提供以下值>

List<A> a = new List<A>();

值将在数组中例如

string [] values = new string[]

我有一个具有以下属性的对象,其中类A {字符串name1 {get; set;字符串名称2 {get; set;}列表b {get; set;}}类B {字符串名称{get; set; }我想查找是否...

c# .net linq search ef-core-3.1
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.