Click here to Skip to main content
15,910,009 members
Home / Discussions / C#
   

C#

 
QuestionSQL Server Express - How many querys per a second can it handle? Pin
Brad Wick5-Nov-08 12:52
Brad Wick5-Nov-08 12:52 
AnswerRe: SQL Server Express - How many querys per a second can it handle? Pin
Ashfield5-Nov-08 21:16
Ashfield5-Nov-08 21:16 
QuestionNot Getting Data Back From Stored Proc Call Pin
Kevin Marois5-Nov-08 10:28
professionalKevin Marois5-Nov-08 10:28 
AnswerRe: Not Getting Data Back From Stored Proc Call Pin
KaptinKrunch5-Nov-08 10:42
KaptinKrunch5-Nov-08 10:42 
AnswerRe: Not Getting Data Back From Stored Proc Call Pin
Ashfield5-Nov-08 21:26
Ashfield5-Nov-08 21:26 
Questionwaiting for multiple threads Pin
invictus35-Nov-08 10:24
invictus35-Nov-08 10:24 
AnswerRe: waiting for multiple threads Pin
Nicholas Butler5-Nov-08 11:35
sitebuilderNicholas Butler5-Nov-08 11:35 
QuestionAccessing a static variable Pin
Member 41431915-Nov-08 8:46
Member 41431915-Nov-08 8:46 
I'm having an odd issue that appears to have cropped up out of nowhere.

I have a program that uses a plugin interface to add separate modules. I have the main application project, and main function library, and about 6 plugins. In the library, I've defined a Global class to access a few static variables. I needed a dispatcher reference, so I added a static variable in the Global class, which is then set when the main application starts up. The plugins will often then use this variable when they need a dispatcher and none is available.

Originally, this all worked fine, and I haven't changed anything in the Global class; however, now, none of the plugins can see the value of the static variable. I did a little testing, and was able to find this:

If I declare a variable, but don't set a value in the Global class; but then give it a value in the Main Application, it comes up as null when read by a plugin. I have:
In the Global class:
public static string Test;

In Window_Loaded for main app:
Global.Test = "Test";

When checking in a plugin:
MessageBox.Show(Global.Test);
it returns null. I do have a reference to the Global class in the plugin.

If I set the value in the declaration in the Global class it works fine:
In the Global Class:
public stating string Test = "Test";

If I then add this to the Window_Loaded of the main app:
Globa.Test = "MyNewTest";

In the plugin, it displays "Test", even though it was previously set to "MyNewTest" at startup.

I have also checked the value from the main app - checking the value at anytime in the main app returns the correct "MyNewTest".

It appears that when the variable is assigned a value from the main application project, it is not accessible from any of the plugin projects (all different classes, of course).

As I mentioned, this previously worked fine, and I haven't altered the Global class. Additionally, I've also checked plugins that I haven't changed, and they don't seem to work now either, even though none of the components have changed (I've added new plugins, but checking the main app, the Global class and a plugin, all of which have not changed, still show this issue).

Any insight on this would be greatly appreciated.

Thanks,
Mike
AnswerRe: Accessing a static variable Pin
User 66585-Nov-08 9:41
User 66585-Nov-08 9:41 
GeneralRe: Accessing a static variable Pin
Member 41431915-Nov-08 10:25
Member 41431915-Nov-08 10:25 
QuestionHow to compare custom objects in a Dictionary<> Pin
ret76795-Nov-08 8:24
ret76795-Nov-08 8:24 
AnswerRe: How to compare custom objects in a Dictionary<> Pin
User 66585-Nov-08 9:50
User 66585-Nov-08 9:50 
GeneralRe: How to compare custom objects in a Dictionary<> Pin
ret76796-Nov-08 5:27
ret76796-Nov-08 5:27 
GeneralRe: How to compare custom objects in a Dictionary<> Pin
User 66586-Nov-08 10:25
User 66586-Nov-08 10:25 
Questiondeleting data from a database Pin
postonoh5-Nov-08 7:25
postonoh5-Nov-08 7:25 
QuestionRe: deleting data from a database Pin
Le centriste5-Nov-08 8:33
Le centriste5-Nov-08 8:33 
GeneralRe: deleting data from a database Pin
Guffa5-Nov-08 9:17
Guffa5-Nov-08 9:17 
GeneralRe: deleting data from a database Pin
Le centriste5-Nov-08 9:35
Le centriste5-Nov-08 9:35 
AnswerRe: deleting data from a database Pin
Guffa5-Nov-08 9:37
Guffa5-Nov-08 9:37 
GeneralRe: deleting data from a database Pin
postonoh5-Nov-08 9:42
postonoh5-Nov-08 9:42 
QuestionGetting application Icon Pin
Dirso5-Nov-08 7:16
Dirso5-Nov-08 7:16 
AnswerRe: Getting application Icon Pin
Colin Angus Mackay5-Nov-08 7:22
Colin Angus Mackay5-Nov-08 7:22 
GeneralRe: Getting application Icon Pin
Dirso5-Nov-08 7:35
Dirso5-Nov-08 7:35 
AnswerRe: Getting application Icon Pin
Henry Minute5-Nov-08 9:50
Henry Minute5-Nov-08 9:50 
GeneralRe: Getting application Icon Pin
Dirso5-Nov-08 10:54
Dirso5-Nov-08 10:54 

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.