Click here to Skip to main content
15,896,453 members

Comments by ve3tru (Top 11 by date)

ve3tru 7-Jan-13 18:05pm View    
I think I got it, if (p==true)

anyway used a bool it compiles, whether it will cross from one thread to the other
I guess I will need to check out.

Thanks
ve3tru 7-Jan-13 17:32pm View    
I tried it as a bool
static bool p = false;


If(p == true);

that compiles but I don't think its right
ve3tru 7-Jan-13 16:58pm View    
why cant you define P as member?
Please do explain what you mean example?.
P.S.

Might be a dumb question
but my whole thread is public static

public static void Method_11()

so why cant it pass the info

bear with me I'm learning
ve3tru 7-Jan-13 16:39pm View    
Thanks, but I already have that, in fact I have 6 threads running same time parallel. My fault I just gave you a snip-it of code, the rest is hidden so you couldn't see it. I was trying to modify a variable in one thread and get the other one to read it. The only other way I can think of doing this is Time stamping it."In your case the variable p is defined inside the method which becomes a local variable to that method so setting P inside one method doesn't have any effect on the other method."
So in other words I cant get there from here lol
ve3tru 7-Jan-13 15:54pm View    
Looks like having one thread changing a variable, and getting the other one to read it, is way too hard, well for me anyway.