方法一:(能简洁的就要简洁)
int length = (mHistoryDict.Count > 30) ? 30 : mHistoryDict.Count;
方法二: (太长)
int length = 0;
if (mHistoryDict.Count > 30)
length = 30;
else
length = mHistoryDict.Count;
方法一:(能简洁的就要简洁)
int length = (mHistoryDict.Count > 30) ? 30 : mHistoryDict.Count;
方法二: (太长)
int length = 0;
if (mHistoryDict.Count > 30)
length = 30;
else
length = mHistoryDict.Count;