Click here to Skip to main content
15,894,896 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Unable to emit assembly: Referenced assembly 'Interop.ADODB' does not have a strong name Pin
Eddy Vluggen14-Apr-09 10:15
professionalEddy Vluggen14-Apr-09 10:15 
QuestionFile search Pin
anandbpsri14-Apr-09 7:03
anandbpsri14-Apr-09 7:03 
AnswerRe: File search Pin
dojohansen14-Apr-09 7:17
dojohansen14-Apr-09 7:17 
Questionproblem in setup project welcome dialog to get new line in welcom text Pin
Narendra Reddy Vajrala14-Apr-09 5:59
Narendra Reddy Vajrala14-Apr-09 5:59 
QuestionProblem while accessing values set in another class function. Pin
Nilesh Hamane14-Apr-09 1:42
Nilesh Hamane14-Apr-09 1:42 
GeneralRe: Problem while accessing values set in another class function. Pin
Nilesh Hamane14-Apr-09 1:46
Nilesh Hamane14-Apr-09 1:46 
GeneralRe: Problem while accessing values set in another class function. Pin
Narendra Reddy Vajrala14-Apr-09 6:02
Narendra Reddy Vajrala14-Apr-09 6:02 
AnswerRe: Problem while accessing values set in another class function. Pin
dojohansen14-Apr-09 7:29
dojohansen14-Apr-09 7:29 
I don't think you have a good understanding of the problem. Chances are one of the methods doesn't actually assign the static field under some circumstance, and you need to understand what those circumstances are in order to see how to proceed from here.

Also, I cannot help but wonder why you're using static fields. If they really belong to the class rather than an instance of the class then fine, but then you should also use static methods to work with the fields. Not that this would affect whether or not the fields get set; it just doesn't make any sense to require instance methods to be used to set class state - at least in most cases it wouldn't make sense.

The short answer to most questions of the sort "my code says to add together two and two and store the result in the variable 'n', but after the code has run the value of n is five. Why?" is "attach the debugger". Step through your code and step into the "SetF.." methods and inspect local, instance, and class variables, and you'll probably soon find out exactly why it doesn't work as expected, while at the same time learning invaluable debugging skills you can use to solve hundreds of other problems.

If that's not possible, post the minimum code required to reproduce the problem. If the problem is what you say it is, you should be able to reproduce it with simple classes a bit like this:

public class A
{
   static int n;
   static public void SetN(int value) { A.n = value; }
   static public void GetN() { return A.n; }
}


I presume you have a way to GET the value that is being set as well, although I do not understand why you'd use this approach over static properties.
GeneralRe: Problem while accessing values set in another class function. Pin
Nilesh Hamane14-Apr-09 22:33
Nilesh Hamane14-Apr-09 22:33 
QuestionTransfer of parametres from Internet Explorer in UseControl ActiveX a component Pin
Degun14-Apr-09 0:49
Degun14-Apr-09 0:49 
AnswerRe: Transfer of parametres from Internet Explorer in UseControl ActiveX a component Pin
dojohansen14-Apr-09 7:33
dojohansen14-Apr-09 7:33 
GeneralRe: Transfer of parametres from Internet Explorer in UseControl ActiveX a component Pin
Degun14-Apr-09 19:58
Degun14-Apr-09 19:58 
GeneralRe: Transfer of parametres from Internet Explorer in UseControl ActiveX a component Pin
dojohansen14-Apr-09 21:03
dojohansen14-Apr-09 21:03 
QuestionDetect save from a VS2005 add-in Pin
Christian Wikander13-Apr-09 22:36
Christian Wikander13-Apr-09 22:36 
AnswerRe: Detect save from a VS2005 add-in Pin
dojohansen14-Apr-09 7:36
dojohansen14-Apr-09 7:36 
QuestionHelp with update Pin
hendrikbez13-Apr-09 19:20
hendrikbez13-Apr-09 19:20 
AnswerRe: Help with update Pin
Pete O'Hanlon13-Apr-09 21:55
mvePete O'Hanlon13-Apr-09 21:55 
GeneralRe: Help with update Pin
hendrikbez13-Apr-09 22:26
hendrikbez13-Apr-09 22:26 
GeneralRe: Help with update Pin
Eddy Vluggen13-Apr-09 23:11
professionalEddy Vluggen13-Apr-09 23:11 
GeneralRe: Help with update Pin
hendrikbez13-Apr-09 23:59
hendrikbez13-Apr-09 23:59 
GeneralRe: Help with update Pin
Eddy Vluggen14-Apr-09 1:13
professionalEddy Vluggen14-Apr-09 1:13 
GeneralRe: Help with update Pin
hendrikbez14-Apr-09 1:33
hendrikbez14-Apr-09 1:33 
GeneralRe: Help with update Pin
Eddy Vluggen14-Apr-09 6:16
professionalEddy Vluggen14-Apr-09 6:16 
GeneralRe: Help with update Pin
hendrikbez14-Apr-09 23:24
hendrikbez14-Apr-09 23:24 
GeneralRe: Help with update Pin
Eddy Vluggen15-Apr-09 0:11
professionalEddy Vluggen15-Apr-09 0:11 

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.