Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
AnswerRe: REF AND OUT VARIABLES [modified] Pin
musefan21-Oct-09 2:43
musefan21-Oct-09 2:43 
GeneralRe: REF AND OUT VARIABLES Pin
Luc Pattyn21-Oct-09 4:16
sitebuilderLuc Pattyn21-Oct-09 4:16 
AnswerRe: REF AND OUT VARIABLES Pin
Ghydo21-Oct-09 2:47
Ghydo21-Oct-09 2:47 
GeneralRe: REF AND OUT VARIABLES Pin
Ghydo21-Oct-09 2:53
Ghydo21-Oct-09 2:53 
GeneralRe: REF AND OUT VARIABLES Pin
musefan21-Oct-09 2:55
musefan21-Oct-09 2:55 
GeneralRe: REF AND OUT VARIABLES Pin
Ghydo21-Oct-09 3:04
Ghydo21-Oct-09 3:04 
GeneralRe: REF AND OUT VARIABLES Pin
musefan21-Oct-09 3:08
musefan21-Oct-09 3:08 
GeneralRe: REF AND OUT VARIABLES Pin
Saksida Bojan21-Oct-09 6:12
Saksida Bojan21-Oct-09 6:12 
Int32 someInt = 6;
SomeMethod(ref someInt);
MessageBox.Show("SomeInt now contains value" + someInt.ToString()); // It has value of 12
// And now for method
public void SomeMethod(ref Int32 data)
{
	data = data * 2;
}


musefan wrote:
I did think of bringing that up, but when would you be able to alter the value from outside the function while the function is running? You would need multi-thread, in which case there would be other issues.


that is the same think as using static, I really don't remember if it compiles if you access directly from different thread, but it is a programmer job to make it Thread Safe. Also as I think accessing a method in different thread you need to use Invoke() method, at least it is one of three possible ways
GeneralRe: REF AND OUT VARIABLES Pin
Luc Pattyn21-Oct-09 4:12
sitebuilderLuc Pattyn21-Oct-09 4:12 
Question.NET SerialPort Pin
hairy_hats21-Oct-09 1:54
hairy_hats21-Oct-09 1:54 
AnswerRe: .NET SerialPort Pin
Luc Pattyn21-Oct-09 2:22
sitebuilderLuc Pattyn21-Oct-09 2:22 
GeneralRe: .NET SerialPort Pin
hairy_hats21-Oct-09 2:55
hairy_hats21-Oct-09 2:55 
GeneralRe: .NET SerialPort Pin
Luc Pattyn21-Oct-09 3:50
sitebuilderLuc Pattyn21-Oct-09 3:50 
QuestionTimer and closing console Pin
abbd21-Oct-09 1:52
abbd21-Oct-09 1:52 
AnswerRe: Timer and closing console Pin
Alan N21-Oct-09 2:00
Alan N21-Oct-09 2:00 
GeneralRe: Timer and closing console Pin
abbd21-Oct-09 2:07
abbd21-Oct-09 2:07 
GeneralRe: Timer and closing console Pin
J4amieC21-Oct-09 2:17
J4amieC21-Oct-09 2:17 
GeneralRe: Timer and closing console Pin
abbd21-Oct-09 2:20
abbd21-Oct-09 2:20 
GeneralRe: Timer and closing console Pin
Mirko198021-Oct-09 2:36
Mirko198021-Oct-09 2:36 
GeneralRe: Timer and closing console Pin
Alan N21-Oct-09 2:21
Alan N21-Oct-09 2:21 
GeneralRe: Timer and closing console Pin
abbd21-Oct-09 2:31
abbd21-Oct-09 2:31 
AnswerRe: Timer and closing console Pin
Luc Pattyn21-Oct-09 2:25
sitebuilderLuc Pattyn21-Oct-09 2:25 
QuestionCheckedListBox how to catch a event. Pin
JollyMansArt21-Oct-09 1:30
JollyMansArt21-Oct-09 1:30 
AnswerRe: CheckedListBox how to catch a event. Pin
stancrm21-Oct-09 1:33
stancrm21-Oct-09 1:33 
GeneralRe: CheckedListBox how to catch a event. Pin
JollyMansArt21-Oct-09 2:54
JollyMansArt21-Oct-09 2: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.