1. Course
  2. Text Files A
  3. Search lines in a text file

Search lines in a text file


Last updated: 8/23/2020 Difficulty: Intermediate

Create a C# program that reads the contents of a text file and stores it in an array of strings.

Then ask the user for words or phrases until you enter an empty text. Each time the user enters a word or phrase, it shows the lines that match the text, provided it is not empty.

Input

Output

vulputate himenaeos. Venenatis dapibus congue quis aptent tincidunt vivamus
fermentum eu libero eros nullam varius curabitur, ligula et sem sapien eget fringilla
euismod justo sociis malesuada aliquet leo pretium nullam ullamcorper vitae nostra mi 

Solution

Text Files A

4 / 6

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation


Your donations support our work and contribute to the maintenance of the app.

Advertising