Doubt about resource files
-
Hi All, I am using C#.2005. I created a resource file in business layer to store messages for users. As per you know, visual studio automatically created a class for this resource file and properties for each string. So I can access each string by typing [class name].[property name]. The problem is that these properties are declared with the keyword 'internal'. So I can access it only in the business layer. To access these properties in presentation layer, I changed the scope to public. Now I can access the properties also from presentation layer. But there is hundreds of string in this resource file. So it is difficult to modify each property. How can I overcome this problem? Please help me. Thanks & Regards, Hogan
-
Hi All, I am using C#.2005. I created a resource file in business layer to store messages for users. As per you know, visual studio automatically created a class for this resource file and properties for each string. So I can access each string by typing [class name].[property name]. The problem is that these properties are declared with the keyword 'internal'. So I can access it only in the business layer. To access these properties in presentation layer, I changed the scope to public. Now I can access the properties also from presentation layer. But there is hundreds of string in this resource file. So it is difficult to modify each property. How can I overcome this problem? Please help me. Thanks & Regards, Hogan
Sounds like the class belongs in the presentation layer, seeing as it consists of rendering details.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Sounds like the class belongs in the presentation layer, seeing as it consists of rendering details.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Sorry I didn't get you. Can you please explain it little bit more? Thanks Hogan
-
Sorry I didn't get you. Can you please explain it little bit more? Thanks Hogan
Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
No sir. I want to use it in both layer. That's why I created it in BL. For example I created functions to send mail to users. These functions are written in the BL. The mail body is declared in this resource file. So I want to access it in BL. Thanks to spend time with me Hogan
-
Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
oh I can pass it as parameters. Sorry to waste your time for these silly questions. But I am curious, is there any way to access resource files in different assemblies? Thanks and Regards, Hogan