Error : when i am trying to call language folder the next message appear as an error message "WebApplication5.language is a namespace but is used like a variable"
Asked
Active
Viewed 957 times
-2

Irfan
- 665
- 6
- 29

ahmed elgendy
- 3
- 6
-
1Folder != namespace, but Visual Studio, by default, will namespace classes, etc. by the folder they're in. Don't you need something like WebApplication5.language.myresource.??? – ProgrammingLlama Nov 08 '18 at 01:14
-
similar question : https://stackoverflow.com/questions/45397572/c-random-is-a-namespace-but-is-used-like-a-variable-i-dont-understand-why – jazb Nov 08 '18 at 01:15
-
i want to access myresource file so i have to call it from parent , webapplication5"namespace".language"namespace".myresource"class".Property – ahmed elgendy Nov 08 '18 at 01:22
-
@ahmed That's correct, yes. You need to use `WebApplication5.language.myresource.Property` as you have described. – ProgrammingLlama Nov 08 '18 at 01:30
-
@WebApplication5.language.myresource (inaccessabile due to its protection level) whats solution now – ahmed elgendy Nov 08 '18 at 01:34
-
NEVER post images of code, errors or output! https://stackoverflow.com/help/how-to-ask – Rob Jul 31 '19 at 12:10
1 Answers
-1
I have the solution. You need to prepare the class named "myresource
" as a public and all their members should be public so they can read their namespace "language
" but not as a variable.

Irfan
- 665
- 6
- 29

ahmed elgendy
- 3
- 6