モデルがあるとしましょう
public Foo
{
string Something {get;set;}
string SomethingElse {get;set;}
string AnotherThing {get;set;}
}
これらのフィールドのいずれかに からの文字列が含まれているかどうかを判断する最も簡潔な方法は何List
ですか?
var foo = new Foo
{
Something = "If Liverpool don't beat Fulham this evening I will cry",
SomethingElse = "I hope I have that TekPub membership for Xmas",
AnotherThing = "I wish NCrunch was a bit cheaper"
};
var keywords = new List<string> { "Liverpool", "glosrob", "stackoverflow" };
foo.Something
「リバプール」という単語を含めて渡します。