Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 17th, 2018 89 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. void Main()
  2. {
  3.     var Persons = new List<Person>(){
  4.         new Person{
  5.             Name="Алексей",
  6.             Surname="Фоминых"
  7.         },
  8.         new Person{
  9.             Name="Алексей",
  10.             Surname="Дуров"
  11.         },
  12.     };
  13.     var t = Persons.AsQueryable();
  14.    
  15.     var f = "Фоминых Алексей";
  16.    
  17.     foreach (var it in f.ToLower().Split(' '))
  18.     {
  19.         t = t.Where(x=>(x.Name+x.Surname).ToLower().Contains(it));
  20.     }
  21.     Debug.Assert(t.Count()==1);
  22. }
  23.  
  24. class Person
  25. {
  26.     public string Name {get;set;}
  27.     public string Surname {get;set;}
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top