[.Net concept]使用方法與屬性時適時為其值做快取
//Calculate count....
...
return count;
}
int count = myObj.Count;
for (int i = 0; i < count; ++i)
{
for (int j = 0; j < count; ++j)
...
}
}
//Calculate count....
...
return count;
}
int count = myObj.Count;
for (int i = 0; i < count; ++i)
{
for (int j = 0; j < count; ++j)
...
}
}