string comparison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lakshmi prabha
    New Member
    • Feb 2012
    • 2

    string comparison

    Im new to .net i doing my project in .net

    I need a code for reading a text file and store every string in to an array. Check the array by giving some word.

    If the word is found then the full line which the word
    contains is store in to a text boxes
  • Falkeli
    New Member
    • Feb 2012
    • 19

    #2
    To check if str2 is a substring of str1 (that is, str1 contains str2), use the following line:
    Code:
    if (str1.Contains(str2))
        //put code here
    I hope this helps you.

    Comment

    Working...