I have a text file that contains some data in a “block” format:
source : source location
filename : somefile.txt
vendor : somevendor
version : xx.xx.xxx
source : source location2
filename : somefile2.txt
vendor : somevendor2
version : yy.yy.yyy
can I use Linq to query this data and if so how would you go about it? I have used linq to query lines of data from text file many times, but never a “block” of data as above. Thanks for the input.
Yes, you can use LINQ, this approach is not optimized much if you have large file. Below is how to get data:
Version to use LINQ: