Good Morning! I hope your thanksgiving was a happy one. My family is in Minnesota due to the holiday where her brother is getting married so I am here by myself. I ate a stir fry for dinner last night. But really its okay.
Today’s topic is related to my next post concerning how you can save tags to always be included in the Automatic Tag Generation Plugin I am creating for Windows Live Writer. Basically, we want to read a text file that will store those words, which is embedded as a resource file in the dll for the plugin. Happy shopping and make it a great day!
Sub GetFileContents(ByVal FileName As String, ByVal DataTable As DataTable)
Dim this As [Assembly]
this = System.Reflection.Assembly.GetExecutingAssembly
For Each resource As String In this.GetManifestResourceNames()
If resource.IndexOf(FileName) > -1 Then
Dim inFile = New System.IO.StreamReader(this.GetManifestResourceStream(resource))
While inFile.Peek() > -1
Dim readline As String = inFile.ReadLine
Dim row As DataRow = DataTable.NewRow
row.Item(FileName) = readline