Can we return two values from a function?

Answer Posted / niks

I think yes.. Function can return multiple values.. It's
not good practice.. but C# allows you.. Consider following
example

int Val;
GetValue(Val);

bool GetValue(out int Val)
{
Val = value;
return true;
}

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

list the steps in code compilation in c#?

647


Explain polymorphism in c# with a simple example?

673


What is the and operator in c#?

697


Is xml tags are case sensitive?

651


How does aspect oriented programming work?

718


What are the different types of literals in c#?

707


What is an object pool in .net?

822


How more than one version of an assembly can keep in same place?

701


From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?

734


What is delegate in c#?

707


Explain different properties of object oriented systems.

683


What are the advantages of clr procedure over t-sql procedure?

778


What is generic method in c#?

667


How do you prevent a class from being inherited in c#?

611


What is the console on a mac?

667