Hi, I am a C++ programmer trying to learn C#.
I have a class called Record and am looping through the members of an
object of this class:
foreach (Record.Item BCD in MyRecord.RecordItems)
{
....
BCD.SetItemParameter(3.0);
....
}
The only problem is that the change above does not affect the MyRecord
object, only its copy BCD in the foreach loop. How can I make it do so?
In C++ I could use a reference or a pointer.
I have tried replacing the foreach loop with a for loop but that
doesn't work either. Any suggestions?
Thanks,
Bruno