Driver code
public static void Main ( String [ ] args ) { List < String > s = new List < String > ( ) ; s . Add ( " bana " ) ; s . Add ( " apple " ) ; s . Add ( " banacb " ) ; s . Add ( " bonanza " ) ; s . Add ( " banamf " ) ; Console . WriteLine ( check ( s , " banana " ) == true ? 1 : 0 ) ; } }