What is the difference between ref & out parameters?
Answers were Sorted based on User's Feedback
Answer / padam
An argument passed as ref must be initialized before passing
to the method whereas out parameter needs not to be
initialized before passing to a method.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / satya
ref keyword is used while passing the parameters by reference.
out keyword is used while passing the parameters by out
| Is This Answer Correct ? | 0 Yes | 1 No |
Are all methods virtual in c#?
What are the different types of assembly?
Describe a Struct ?
What is uint64_t?
In a single .NET DLL how many classes it contains?
What is overloading with example?
I was trying to use an out int parameter in one of my functions. How should I declare the variable that I am passing to it?
What is the purpose of namespace?
What is tpl in c#?
What is a nullreferenceexception?
Can you inherit multiple interfaces?
7 Answers Host4Big, Mind Tree, Moftak Solutions, Siebel Systems,
What is the advantage of static class in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)