Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have some sample code that works great but I am confused. The only examples I have found anywhere read a file and loop through it. I need to grab individual items by a tag name to place it where I need it. Is there a way to do this?

 

    Public Sub ReadResourceFile()
       Dim myResEnum As IDictionaryEnumerator
       Dim objResXResourceReader As New ResXResourceReader("..\resources\ErrorMessages.resx")
       Dim txt As String = ""
       'Loop through
       myResEnum = objResXResourceReader.GetEnumerator()

       Do While myResEnum.MoveNext
           txt &= String.Concat(myResEnum.Key.ToString(), " - ", myResEnum.Value, vbCrLf)
       Loop
       MsgBox(txt)
       'Close up
       objResXResourceReader.Close()
   End Sub

Posted
Does the code you posted work, or does it not work? How is your data setup? If you could post a sample of the data it would be alot easier to assist you.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...