C# code to check the item in the list exists or not

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 349
C# code to check the item in the list exists or not
var dnfLst_1 = new List<int>() { 10 20 30 40};
bool result = dnfLst_1.Contains(20);


Result True

Comments or Responses

Login to post response