Electronic structure of U2PtC2 and U2RhC2