Info
Version: | 0.1.0 |
Author(s): | Daxia |
Last Update: | Sunday, May 5, 2019 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/shenjielx/Likecoder |
NuGet Url: | https://www.nuget.org/packages/Likecoder.Linq |
Install
Install-Package Likecoder.Linq
dotnet add package Likecoder.Linq
paket add Likecoder.Linq
Likecoder.Linq Download (Unzip the "nupkg" after downloading)
Dependencies
- Likecoder(>= 0.1.0)
var keyword="1";
var list=new List<string>{"1","2","1"};
list.WhereIf(x=>x==keyword, keyword);
// or
list.WhereIf(x=>x==keyword, keyword.IsTrue());
2、WhereTrue() or WhereFalse()
var keyword="1";
var list=new List<string>{"1","2","1", "", " "};
list.WhereTrue(); // {"1","2","1"}
list.WhereFalse(); // {"", " "}.