....txt file is not a member of resources
Hi,
I have the 'resources' folder in my project and it contains a text file called dictionary.txt, which i refer to in my code as
Code:
My.Resources.dictionary.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
This works perfectly.
I then added a second text file called definition.txt, but when i refer to
Code:
My.Resources.definition.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
This gives me an error 'Definition is not a a member of 'Resources'
Can anybody help, as i can not see a way to fix this.......
Re: ....txt file is not a member of resources
and you can see the file in solution explorer?
Re: ....txt file is not a member of resources
If when you type the following (note the dot) if there is a resource named definition it will show in the drop-down list and if not you have not added the file correctly i.e. Property Properties, Resources, add exiting or new file.
Re: ....txt file is not a member of resources
Hi,
I solved it by editing the RESX and adding the 2nd file manually to the list of resources. Both files were visible in the Resources section of the project, but it seems that the actual resources were located elsewhere. Bizzarre.
Thanks
Re: ....txt file is not a member of resources
Quote:
Originally Posted by
lynxbci2011
Hi,
I solved it by editing the RESX and adding the 2nd file manually to the list of resources. Both files were visible in the Resources section of the project, but it seems that the actual resources were located elsewhere. Bizzarre.
Thanks
If you added the file via the resource tab under resources then the resource you added will reside by default under the project folder Resources. Something is not right if you can see the resource via the drop-down list but got an error. Either way good to hear you have what you want now.