Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
QuestionPE header Pin
neliocc14-Sep-05 15:57
neliocc14-Sep-05 15:57 
AnswerRe: PE header Pin
Luis Alonso Ramos14-Sep-05 16:18
Luis Alonso Ramos14-Sep-05 16:18 
QuestionHow to convert Windows Application to .NET ASP Application Pin
sandeeppathuri14-Sep-05 15:22
sandeeppathuri14-Sep-05 15:22 
AnswerRe: How to convert Windows Application to .NET ASP Application Pin
Luis Alonso Ramos14-Sep-05 16:20
Luis Alonso Ramos14-Sep-05 16:20 
QuestionDataGrid Pin
Taurian11014-Sep-05 13:45
Taurian11014-Sep-05 13:45 
AnswerRe: DataGrid Pin
Taurian11017-Sep-05 4:17
Taurian11017-Sep-05 4:17 
QuestionAuto generated code breaks Pin
Christian Graus14-Sep-05 12:57
protectorChristian Graus14-Sep-05 12:57 
AnswerRe: Auto generated code breaks Pin
Ashok Dhamija14-Sep-05 23:32
Ashok Dhamija14-Sep-05 23:32 
There can possibly be three reasons (however, in your problem, reason No. 1 below is more probable) for the problem:

1. The default resource file should be in your main assembly. When you use the following code:

System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DetailsActions));

the resources are not found in the assembly in which they are being searched. However, when you are giving the details of the assembly in which the resources are available (as well as when you are giving the full qualified path of the resource by providing “RDC.controls.DetailsActions”) by way of the following code:

System.Resources.ResourceManager resources = new System.Resources.ResourceManager("RDC.controls.DetailsActions", System.Reflection.Assembly.GetExecutingAssembly());

the search for the resource concerned is conducted in the right assembly whose details are now available in the command System.Reflection.Assembly.GetExecutingAssembly().

So, basically it is a question of giving the default name and path vis-à-vis the fully qualified name and path. When you supply the fully-qualified name and path, the resource can be located, whereas with the default name and path the resource cannot be found.

2. The resource is marked as private. This is what MSDN describes: Resources marked as private are accessible only in the assembly in which they are placed. Because a satellite assembly contains no code, resources private to it become unavailable through any mechanism. Therefore, resources in satellite assemblies should always be public so that they are accessible from your main assembly. Resources embedded in your main assembly are accessible to your main assembly, whether private or public.

3. The third reason could perhaps be when you are using satellite assemblies for different cultures and when you are not providing the correct path for the resource for the particular culture being used. However, apparently this is not your problem, because your problem is getting resolved when you provide the fully qualified name and path.

So, apparently the answer to your problem lies in the reason No. 1 above. To ensure that the problem does not occur, be sure to keep the resource at the appropriate place in a conscious manner and give full name and path.


Regards,
Ashok Dhamija
_____________________________
Padam Technologies
GeneralRe: Auto generated code breaks Pin
Christian Graus15-Sep-05 11:06
protectorChristian Graus15-Sep-05 11:06 
GeneralRe: Auto generated code breaks Pin
Ashok Dhamija15-Sep-05 20:14
Ashok Dhamija15-Sep-05 20:14 
QuestionStatusbar Pin
Taurian11014-Sep-05 10:45
Taurian11014-Sep-05 10:45 
AnswerRe: Statusbar Pin
Mark0614-Sep-05 11:26
Mark0614-Sep-05 11:26 
AnswerRe: Statusbar Pin
Luis Alonso Ramos14-Sep-05 16:24
Luis Alonso Ramos14-Sep-05 16:24 
Questionmeasuring string Pin
xilefxilef14-Sep-05 10:31
xilefxilef14-Sep-05 10:31 
AnswerRe: measuring string Pin
seee sharp15-Sep-05 2:40
seee sharp15-Sep-05 2:40 
Question.net going away? Pin
Daniel132414-Sep-05 10:07
Daniel132414-Sep-05 10:07 
AnswerRe: .net going away? Pin
Colin Angus Mackay14-Sep-05 10:28
Colin Angus Mackay14-Sep-05 10:28 
GeneralRe: .net going away? Pin
Paul Conrad14-Sep-05 19:40
professionalPaul Conrad14-Sep-05 19:40 
AnswerRe: .net going away? Pin
Michael P Butler14-Sep-05 10:38
Michael P Butler14-Sep-05 10:38 
AnswerRe: .net going away? Pin
Alvaro Mendez14-Sep-05 11:20
Alvaro Mendez14-Sep-05 11:20 
GeneralRe: .net going away? Pin
Daniel132414-Sep-05 11:22
Daniel132414-Sep-05 11:22 
AnswerRe: .net going away? Pin
Christian Graus14-Sep-05 11:31
protectorChristian Graus14-Sep-05 11:31 
GeneralRe: .net going away? Pin
Judah Gabriel Himango14-Sep-05 12:37
sponsorJudah Gabriel Himango14-Sep-05 12:37 
AnswerRe: .net going away? Pin
Matt Gerrans14-Sep-05 18:42
Matt Gerrans14-Sep-05 18:42 
GeneralRe: .net going away? Pin
Daniel132415-Sep-05 2:06
Daniel132415-Sep-05 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.