Read
I have a text file which is added to your project DataMid / Bigram_MidWord.txt where DataMid a folder and Bigram_MidWord.txt There is a file to read ; When I statement
I Exception and get this: How can I fix this problem? problem A resource is a text file that your XAP file, you have the following code You can use:. FileStream Filestream = write new FileStream (@ "/ Sourcecode, component / DataMid / Bigram_MidWord.txt", FileMode.Open, FileAccess.ReadWrite) p>
try to use the method failed: System.IO.FileStream..ctor (System.String, System.IO.FileMode, System.IO.FileAccess) < / P>
Trying to use FileStream .
FileStream file is used to access the system (such as luggage isolated)
string text; Uri uri = new Uri ( "(" / AssembyName; component / DataMid / Bigram_MidWord.txt ", UriKind.RelativeOrAbsolute); StreamResourceInfo Mr = App.GetResourceStream (URI); StreamReader sr = new StreamReader (sri.Stream); text = sr .ReadToEnd (); sr.Close ();
Comments
Post a Comment