|
-
August 5th, 2012, 09:25 PM
#1
Can I pass a new bool as a reference?
I have a quick question about how to condense two lines into one.
The following code works:
bool pass = false;
MyFunction(ref pass);
I would like to turn it into the following:
MyFunction(ref new bool(false))
But that doesn't work in the compiler. Is there a correct syntax for this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|