Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if(!String.IsNullOrEmpty(search))
     {

         list = list.Where(u => u.xMsgDisplayAddr.Contains(search)).ToList();

         list = list.Where(u => u.xMsgNo.Contains(search)).ToList(); --> problem here
     }


What I have tried:

xMsgNo is a long data type, how to check contains by string for long variable?
Posted
Updated 18-Sep-16 22:08pm
Comments
Maciej Los 19-Sep-16 4:08am    
Could you be more specific and provide more details> Note: we don't see your screen and we can't read in your mind.

1 solution

use ToString()
C#
list = list.Where(u => u.xMsgNo.ToString().Contains(search)).ToList();  
 
Share this answer
 
Comments
wa.war 19-Sep-16 4:10am    
Thanks!
Karthik_Mahalingam 19-Sep-16 4:11am    
welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900