Interviewer And Interviewee Guide

C# (Sharp) Programming Language Interview Question:

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?

Submitted by: Administrator
You should declare the variable as an int, but when you pass it in you must specify it as ‘out', like the following: int i; foo(out i); where foo is declared as follows:
[return-type] foo(out int o) { }
Submitted by: Administrator

Read Online C# (Sharp) Programming Language Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.