A closure device for releasably connecting two parts with each other, comprising - a first closure member having a rigid first locking protrusion and - a second closure member which is attachable to the first closure member and in a closed position is held on the first closure member, the second closure member having a rigid second locking protrusion, wherein the second locking protrusion can be brought into engagement with the first locking protrusion in an engagement direction and in the closed position engages the first locking protrusion in a positive locking manner, - wherein the first closure member comprises a first magnetic member (23, 23A, 23B) and the second closure member comprises a second magnetic member (33, 33A, 33B), the first magnetic member (23, 23A, 23B) and the second magnetic member (33, 33A, 33B) being constituted to magnetically attract each other when the second closure member is attached to the first closure member for closing the closure device, wherein the first closure member comprises a base and a locking element rigidly attached to the base and carrying the first locking protrusion, wherein the second closure member comprises a locking part carrying the second locking protrusion and having a front face which in the closed position faces the locking element of the first closure member, characterized in that the first closure member comprises two first electric contact elements, and the second closure member comprises two second electric contact elements, the first electric contact elements and the second electric contact elements being configured to electrically contact each other in the closed position of the closure device, wherein the two first electric contact elements are arranged on the base of the first closure member, the two first electric contact elements facing towards the second closure member when attaching the first closure member and the second closure member to each other, wherein the first electric contact elements are displaced with respect to one another on the base in a transverse direction with respect to the engagement direction. - a first closure member having a rigid first locking protrusion and - a second closure member which is attachable to the first closure member and in a closed position is held on the first closure member, the second closure member having a rigid second locking protrusion, wherein the second locking protrusion can be brought into engagement with the first locking protrusion in an engagement direction and in the closed position engages the first locking protrusion in a positive locking manner, - wherein the first closure member comprises a first magnetic member (23, 23A, 23B) and the second closure member comprises a second magnetic member (33, 33A, 33B), the first magnetic member (23, 23A, 23B) and the second magnetic member (33, 33A, 33B) being constituted to magnetically attract each other when the second closure member is attached to the first closure member for closing the closure device, wherein the first closure member comprises a base and a locking element rigidly attached to the base and carrying the first locking protrusion, wherein the second closure member comprises a locking part carrying the second locking protrusion and having a front face which in the closed position faces the locking element of the first closure member, characterized in that the first closure member comprises two first electric contact elements, and the second closure member comprises two second electric contact elements, the first electric contact elements and the second electric contact elements being configured to electrically contact each other in the closed position of the closure device, wherein the two first electric contact elements are arranged on the base of the first closure member, the two first electric contact elements facing towards the second closure member when attaching the first closure member and the second closure member to each other, wherein the first electric contact elements are displaced with respect to one another on the base in a transverse direction with respect to the engagement direction.