thehack Posted August 23, 2003 Posted August 23, 2003 I have found that streamreader seems to ignore the quote character (single or double) when reading in a text file. I use stream reader to populate textboxes and have not found a way to include quotes. Any thoughts? Quote
*Experts* mutant Posted August 23, 2003 *Experts* Posted August 23, 2003 It works for me, what code are you using? Quote
thehack Posted August 24, 2003 Author Posted August 24, 2003 I used this code Public fStreamReader As StreamReader Try fStreamReader = File.OpenText(strHelpFileName) Try lblHelp.Text = fStreamReader.ReadToEnd Catch ex As Exception lblHelp.Text = ex.ToString End Try Catch ex As Exception lblHelp.Text = ex.ToString End Try Works great if the target file does not contain a " or ' otherwise just seems to ignore them. Quote
*Gurus* divil Posted August 26, 2003 *Gurus* Posted August 26, 2003 Ignore them? It reads them in just fine, were you expecting it to do something else? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.