In a court of law, whether of original jurisdiction or of error, upon a voluntary or involuntary discontinuance or dismissal of the action, there shall be judgment for costs for the defendant. Generally a party for whom final judgment in any civil action, or on a writ of error upon a judgment is given in such action, shall recover, against the adverse party, costs of suit, to be awarded by the court.
10 Del. C. § 5101