We present a method to calculate the I-V characteristics of semiconductor nanowires under the metal-semiconductor-metal (MSM) structure. The carrier concentration as an important parameter is introduced into the expression of the current. The subband structure of the nanowire has been considered for associating it with the position of the Fermi level and circumventing the uncertainties of the contact areas in the contacts. The tunneling and thermionic emission currents in the two Schottky barriers at the two metal-semiconductor contacts are discussed. We find that the two barriers have different influences on the I-V characteristics of the MSM structure, one of which under the forward bias plays the role of threshold voltage if its barrier height is large and the applied voltage is small, and the other under the reverse bias controls the shapes of I-V curves. Our calculations show that the shapes of the I-V curves for the MSM structure are mainly determined by the barrier heights of the contacts and the carrier concentration. The nearly identical I-V characteristics can be obtained by using different values of the barrier heights and carrier concentration, which means that the contact type conversion can be ascribed not only to the changes of the barrier heights but also that of the carrier concentration. We also discuss the mechanisms of the ohmic-Schottky conversions and clarify the ambiguity in the literature. The possibility about the variation of the carrier concentration under the applied fields has been confirmed by experimental results.