Skip to content
Loading
  • Jignesh Kumar
    0
    Hi, 
    Please use below links which will help you,
    https://stackoverflow.com/questions/38390156/linq-how-to-select-certain-text-true-or-false-for-corresponding-boolean-val 
    https://forums.asp.net/t/1637362.aspx?How+to+convert+bool+value+into+string+in+LINQ+
    0
  • Laxmidhar Sahoo
    0
    1. class Student  
    2. {  
    3. string stdname,  
    4. isactive bool  
    5.   
    6. }  
    7.   
    8.   
    9. IList studentList = new List() {   
    10.         new Student() { stdname = "John", isactive = true} ,  
    11.         new Student() { stdname = "mon", isactive = false}   
    12. }  
    13.   
    14. var filteredResult = from s in studentList  
    15.                     where s.isactive == true  
    16.                     select s.stdname ;  
    0