Opening a file from a pack URI in WPF
Posted
by cptmorgan
on Stack Overflow
See other posts from Stack Overflow
or by cptmorgan
Published on 2010-03-28T09:07:36Z
Indexed on
2010/03/28
9:13 UTC
Read the original article
Hit count: 360
Hi All,
I am looking to open a .csv file from the application pack to do some unit testing. So what I would really love is some analog to File.ReadAllText(string path) which is instead X.ReadAllText(Uri uri). I haven't as yet been able to find this.
Does anyone know if it is possible to read text / bytes (don't mind which) from a file in the pack without compiling this file to disk first?
Oh and btw, File.ReadAllText(@"pack://application:,,,/SpreadSheetEngine/Tests/Example.csv") didn't work for me..
Thanks in advance..
Gav
© Stack Overflow or respective owner