G
Guest
I am using List<MyClass> to store a bunch of MyClasses. And in my program, I
want to change the content of one class in this list. However, it seems to me
that this list keeps an original copy and is only "readable".
Following is my code:
int index = GetMyClassIndFromName(string);
if (index != -1)
{
MyClass mf = m_allMyClass[index];
mf.Available = true;
}
I think the mf is just a temporary copy of that MyClass. How may I change
the original content?
Thanks,
want to change the content of one class in this list. However, it seems to me
that this list keeps an original copy and is only "readable".
Following is my code:
int index = GetMyClassIndFromName(string);
if (index != -1)
{
MyClass mf = m_allMyClass[index];
mf.Available = true;
}
I think the mf is just a temporary copy of that MyClass. How may I change
the original content?
Thanks,