what is reference parameter?
what is out parameters?
what is difference these two?

Answer Posted / vijaysaxena

out -doesnot keep initial value or assigned value.
ref-does
void f1(out int t){
t+=100 //give error becs t has no value --true for ref
t=100 //possible
}

Is This Answer Correct ?    6 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is msil, and why should developers need an appreciation of it if at all?

558


Can you declare a class or a struct as constant?

536


What is parameters in c#?

489


What is a concrete class in c#?

525


What is the xml document structure?

461






Is c# the same as d flat?

493


Explain the role of the datareader class in ado.net connections?

455


Write the syntax for catching an exception in c#?

478


How do I unload an assembly?

509


Explain About Web.config

551


What is eager and lazy loading in c#?

459


Why do we need indexers in c#?

464


What is difference between internal and protected internal in c#?

454


windows c# using datagridview in edit form sql server

3559


What is the relationship between a process, application domain, and application?

486