5
Answers

[Novice Question] Returning parameters by reference?

Richard Bangs

Richard Bangs

17y
1.7k
1
Hello :)

I'm from a C++ background and have been toying with C#, I'm attempting to return a parameter by reference, something like:

cVector3& cCamera::getPosition()
{
   return mPosition; 
}

Although many google searches later I haven't been able to uncover anything :(
Answers (5)