Not necessarily. It's all about the rim and hub dimensions that define the spoke length. Then there's the drive and non drive differences too. You might get lucky if rims and or hubs are similar but best to get some measurements and use a spoke length calculator, or speak to someone who has access to one in the trade that can confirm the spike lengths you need.
You've then of course got different quality of spokes to consider, plain guage, single, double butted etc. Not all spokes are the same.