|
In c# , when sending a parameter to a method, when should we use "ref" and when "out" and when without any of them?
Started by odiseh on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
The difference between ref and out, is that when using out, the compiler enforces the rule, that you need to....
Use out when the method always should assign something to the value.
Ref when the method might need to modify the value.
|
|
As the title says when should I use List and when should I use ArrayList ?
Thanks
Started by Scott on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
List the List generic, almost always when you....
I can't see any use to ArrayList when high performing List exists.
You should always use List<TypeOfChoice> List where ever possible.
when using List, you don't have to do that.
|
|
I am confused with the differences of the two. When do you use https:// and when do you use ssl:// ?
Started by Randell on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
My guess is that you'd only use it when you wanted to open a connection know ssl:// when used in PHP Scripts ( fsockopen as a way to open a SSL connection to a given host.
Protocol to talk or what port.
|
Ask your Facebook Friends
|
When should I use /dev/shm/ and when should I use /tmp? Can I always rely on them both being there on Unices?
Started by Kent on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Use /dev/shm/ when you want shared memory (ie, interprocess.
Use /tmp/ for temporary files.
|
|
When does one use OK+Cancel in a dialog and when "Save + Cancel". I have seen them used interchangeably. Is there a window standard?
Started by Roel Vlemmings on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Use ....
Before closing?" => Yes/No/Cancel
"All changes will be lost when closing this window." => OK lengthy period of time over alternate button text when those two have been around for ages and do, maybe they’ll recheck their work.
|
|
Could anyone explain with some examples when it is better to call functions by reference and when it is better to call by address?
Started by niko on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want it to be possible to pass NULL value to... .
Passing arguments by reference eliminate the chance of them being NULL .
Pass your arguments to function using reference whenever possible.
Reference.
See Pointer vs.
This has already been discussed.
|
|
I have a service that runs and I'd like to receive notification when:
a) the network is connected.
b) when a user logs in to the machine.
How can I do this? (C# .NET 2.0)
Started by Rory on
, 7 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
SENS can do(VS.85).aspx
To find out when the network is connected, add a handler for the NetworkAvailabilityChanged in the System.Net.NetworkInformation....
Here is a CodeProject link
I don't know how to listen for when the network connects.
|
|
Hi what is the necessity of using Application.DoEvents and when we should use it?
Started by odiseh on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Application.DoEvents is usually used to make sure that events get handled periodicaly when you're Control.BeginInvoke / Invoke or with BackgroundWorker ) when you need to update the UI.
|
|
MAC address and IP address are used to uniquely identify a computer. When is an IP address used and when is a MAC address used?
Started by Ram on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at superuser):
A MAC-Address is an Unique Identifier of the network interface (stored in the hardware), and the IP-Address is the assigned (from a router f.e.) network address within the network .
A MAC-Address and an IP-Address are two completely different things .
|
|
I'm presently doing about 10 programmers jobs, this is typical recession type fun. I have many clients asking me "When? When will you have my request completed?"
Considering the other requests that I have to fulfill it's a real balancing act. So how should...
Started by leeand00 on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
If you are just running by the seat of your?
If you have, then the answer is simple: you tell them when you have estimated that you will have expect to have an idea when their....
when it says the work will be done and tell them that.
|