The interplay between topology and crystalline symmetries in materials can lead to a variety of topological crystalline insulator (TCI) states. Despite significant effort towards their experimental realization, so far only Pb$_{1-x}$Sn$_x$Te has been confirmed as a mirror-symmetry protected TCI. Here, based on first-principles calculations combined with a symmetry analysis, we identify a rotational-symmetry protected TCI state in the transition-metal dipnictide RX$_2$ family, where R = Ta or Nb and X = P, As, or Sb. Taking TaAs$_2$ as an exemplar system, we show that its low-energy band structure consists of two types of bulk nodal lines in the absence of spin-orbit coupling (SOC) effects. Turning on the SOC opens a continuous bandgap in the energy spectrum and drives the system into a $C_2T$-symmetry-protected TCI state. On the (010) surface, we show the presence of rotational-symmetry-protected nontrivial Dirac cone states within a local bulk energy gap of $\sim$ 300 meV. Interestingly, the Dirac cones have tilted energy dispersion, realizing a type-II Dirac fermion state in a topological crystalline insulator. Our results thus indicate that the TaAs$_2$ materials family provides an ideal setting for exploring the unique physics associated with type-II Dirac fermions in rotational-symmetry-protected TCIs.