Direct current is the original electrical current that was produced when
Thomas Edison went into business with the Edison Light and Electrical Company. It worked just fine except for one thing: it had to be produced with tremendously high amounts of voltage, because it would not travel very well over long distances. As far as the solenoid is concerned, electricity is electricity, whether it is direct current, DC, or alternating current, AC. The principle is still the same, and the distance the current will travel over the same, so there should be negligible result as a result of using direct current over alternating current. Now, if the direct current were being supplied from a considerable distance, there might be a drop in voltage by the time the current actually reached the solenoid. But usually, if you are using a battery, or some other device that supplies direct current, distance should be short, and power loss not an issue.