Object reference not set to an instance of an object.
I am trying to write a .dll to use to pull up a text so I can count each character, word, paragraph, & sentence. When I trie dto use streamreader to open file I get this:
System.NullReferenceException: Object reference not set to an instance of an object
Here is the code that is getting error
Dim stringProcessor As Course.Class1
ofdMain.ShowDialog()
stringProcessor.StringContents = txtRead.[Text]
txtCharacters.[Text] = Microsoft.VisualBasic.CompilerServices.StringType.FromInteger(stringProcessor.Characters)
txtWords.[Text] = Microsoft.VisualBasic.CompilerServices.StringType.FromInteger(stringProcessor.Words)
txtSentences.[Text] = Microsoft.VisualBasic.CompilerServices.StringType.FromInteger(stringProcessor.Sentences)
txtParagraphs.[Text] = Microsoft.VisualBasic.CompilerServices.StringType.FromInteger(stringProcessor.Paragraphs)
Return
Any help w/ this would be appreciated