public void sortingByPrice(bool ascending = true) { for (int i = 0; i < m_size - 1; i++) { for (int j = 0; j < m_size - i - 1; j++) { if (ascending ^ (m_transactionDataArray[j].m_price > m_transactionDataArray[j + 1].m_price)) { TransactionData.swap(ref m_transactionDataArray[j], ref m_transactionDataArray[j + 1]); } } } }
public void sortingByPropertyDate(bool ascending = true) { for (int i = 0; i < m_size - 1; i++) { for (int j = 0; j < m_size - i - 1; j++) { if (ascending ^ (m_transactionDataArray[j].m_propertyDate.CompareTo(m_transactionDataArray[j + 1].m_propertyDate) == 1)) { TransactionData.swap(ref m_transactionDataArray[j], ref m_transactionDataArray[j + 1]); } } } }