private void modify()
{
// if readonly then throw readonly exception
if (m_isReadonly)
throw ReadonlyErr.make("List is readonly").val;
// if we have a cached readonlyList, then detach
// it so it remains immutable
if (m_readonlyList != null)
{
object[] temp = new object[m_size];
Array.Copy(m_values, temp, m_size);
m_readonlyList.m_values = temp;
m_readonlyList = null;
}
}