Except as otherwise provided in this subtitle:
(1) To the extent set forth in the partnership agreement, a partner is entitled to receive distributions from a limited partnership before his withdrawal and before the dissolution and winding up of the limited partnership; and
(2) To the extent set forth in the partnership agreement, a limited partner is entitled to receive distributions which constituted a return of any part of that limited partner’s contribution before his withdrawal and before the winding up of the limited partnership.