Read text file with Linq in C # and apply filters

The following method allows you to read a text file, apply filters and store it in a string list.

References

using System.Linq;
using System.IO;

File “test.txt

VICTOR COMPUTER
CLAUDIO COMPUTER
FELIPE
SAP CONSULTANT

Code

The result will be a list with 2 elements:

VICTOR COMPUTER
CLAUDIO COMPUTER

We hope it is of your use, we remain attentive to your comments …

regards

CC BY-NC-ND 4.0 Read text file with Linq in C # and apply filters by QualityInfoSolutions is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Contáctenos