let's see if i got it:
in c# ref types are by default passed by ref and value types are by default passed by out..is this truth?
Printable View
let's see if i got it:
in c# ref types are by default passed by ref and value types are by default passed by out..is this truth?
By default, all parameters in .NET are passed by value (except reference types, which are always passed by ref. Output parameters are always passed by reference and do not need to be initialized before use. The method that is called is responsible for initializing the variable.
hmm i didnt get it
what does "out" do? is it the ByVal equivalent to vb.net?
When a parameter is passed using out, it does not have to be initialized. You can just declare it and pass it.
if out was'nt used you would get a compile error.Code:string name;
Hello(out name);
public viod Hello(out string Name)
{
Name = "DevGrp";
}
ahhhhhhh!
and for what is it useful?!
If you want to create a method that returns multiple values
Lethal, did you get a pm from me? Haven't heard a response, so I wasn't sure.
No, didn't get it. Let me check.
It was just about the MCSD exams for .net, and whether you took any of the C# exams yet. If so, what should I hit hard on with my studying?
I'm going to take the windows exam here in the next few days. If it's anything like the old exams from the VB6 days, I'm gonna spend alittle extra time going over the different types of deployment and the various setup files.