Saturday, August 13, 2011

In C#, can I use both p by address and p by value in the same function?

I am writing a function to calculate the marginal tax rate, and calculate the amount taxed and the tax on that amount at each tax rate. In order to minimize the number of variables for amount taxed and the tax on that amount, I was thinking of using p by address and p by value, because I don't want to modify some of my variables through the function. Would it be possible to p some of my parameters by address, and some by just the value within the same function?

No comments:

Post a Comment