What is the difference between out and ref in c#?
Answer / Mr Sambhu Kumar
In C#, both 'out' and 'ref' are used to pass variables by reference. However, a variable declared with 'out' must be explicitly assigned before it leaves the function, while a variable declared with 'ref' can have its initial value passed into the function, or it can be initialized within the function itself.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain About Postback
What is a delegate?
What is the difference between delegates and events in c#?
what are delegates? How you used then in your project?
10 Answers Hawk Eye, IndiaTimes, Kanbay,
What is datacontract in c#?
How does the clr work?
if a method is marked as protected internal who can access it?
How do namespaces work?
What is parallel programming in c#?
Is java better than c sharp?
What?s the difference between // comments, /* */ comments and /// comments?
OOPs concept ?
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)