A heat exchanger, comprising: - a heat transfer block made of metal and formed by being penetrated by a first-refrigerant passage group, the first-refrigerant passage group including a plurality of first-refrigerant passages through which a first refrigerant flows, the first-refrigerant passages arranged in parallel to one another and in a row; - second-refrigerant heat-transfer tubes made of metal different from that of the heat transfer block and configured to constitute a second-refrigerant passage group including a plurality of second-refrigerant passages through which a second refrigerant flows, the second-refrigerant heat-transfer tubes being inserted through a plurality of second-refrigerant heat-transfer-tube insertion holes formed in parallel and in a row so as to be adjacent to the first-refrigerant passage group, the second-refrigerant heat-transfer-tube insertion holes being formed by penetrating through the heat transfer block; - a second-refrigerant communicating header pipes configured to constitute second-refrigerant communicating portions, the second-refrigerant communicating header pipes being joined- to respective both ends of the second-refrigerant heat-transfer tubes along a row direction of the plurality of the second-refrigerant heat-transfer tubes so as to be in communication with all of the second-refrigerant heat-transfer tubes; wherein the second refrigerant flows in and flows out of the second-refrigerant communicating portions and flows through the second-refrigerant passage group, and an inner wall surface of the first-refrigerant passages and an inner wall surface of the second-refrigerant passages are made of different types of metals each other, characterized in that - first-refrigerant communicating holes formed at both ends of the first-refrigerant passage group in a refrigerant flow direction in heat transfer block along a row direction of the plurality of the first-refrigerant passages, the first-refrigerant communicating holes being in communication with the plurality of the first-refrigerant passages, wherein - the first refrigerant flows in and flows out of the first-refrigerant communicating holes and flows through the first-refrigerant passage group, - flow directions of the first-refrigerant passage group and the second-refrigerant passage group are parallel, the first-refrigerant passage group and the second-refrigerant passage group being arranged adjacent to each other with a partition wall therebetween and exchanging heat between the first refrigerant and the second refrigerant over the partition wall. - a heat transfer block made of metal and formed by being penetrated by a first-refrigerant passage group, the first-refrigerant passage group including a plurality of first-refrigerant passages through which a first refrigerant flows, the first-refrigerant passages arranged in parallel to one another and in a row; - second-refrigerant heat-transfer tubes made of metal different from that of the heat transfer block and configured to constitute a second-refrigerant passage group including a plurality of second-refrigerant passages through which a second refrigerant flows, the second-refrigerant heat-transfer tubes being inserted through a plurality of second-refrigerant heat-transfer-tube insertion holes formed in parallel and in a row so as to be adjacent to the first-refrigerant passage group, the second-refrigerant heat-transfer-tube insertion holes being formed by penetrating through the heat transfer block; - a second-refrigerant communicating header pipes configured to constitute second-refrigerant communicating portions, the second-refrigerant communicating header pipes being joined- to respective both ends of the second-refrigerant heat-transfer tubes along a row direction of the plurality of the second-refrigerant heat-transfer tubes so as to be in communication with all of the second-refrigerant heat-transfer tubes; wherein the second refrigerant flows in and flows out of the second-refrigerant communicating portions and flows through the second-refrigerant passage group, and an inner wall surface of the first-refrigerant passages and an inner wall surface of the second-refrigerant passages are made of different types of metals each other, characterized in that - first-refrigerant communicating holes formed at both ends of the first-refrigerant passage group in a refrigerant flow direction in heat transfer block along a row direction of the plurality of the first-refrigerant passages, the first-refrigerant communicating holes being in communication with the plurality of the first-refrigerant passages, wherein - the first refrigerant flows in and flows out of the first-refrigerant communicating holes and flows through the first-refrigerant passage group, - flow directions of the first-refrigerant passage group and the second-refrigerant passage group are parallel, the first-refrigerant passage group and the second-refrigerant passage group being arranged adjacent to each other with a partition wall therebetween and exchanging heat between the first refrigerant and the second refrigerant over the partition wall.