c# - get a word after specific word/character from .txt file -


to point, i've problem getting word/string after specific word or character .txt file, txt file

andrea = bad
john = good
rob = evil

so when input andrea output bad, when input john output good, , when input rob output evil

i want word after "=" showed when first word inputted, lines in file structured that.

sorry poor english, hope understand asked

var dict = file.readlines(filename)                     .select(line => line.split('='))                     .where(parts => parts.length>1)                     .todictionary(x=>x[0].trim(), x=>x[1].trim());  console.writeline(dict["andrea"]); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -