I think hes asking about putting a 9mm barrel in a .40 slide or vice versa. If thats the case, I posed the same question a month or two ago and this is the answer Dan gave me. Seems to make a lot of sense to me.
The answer is the same for most every semi-auto out on the market, NO.
That does not mean that there is now way that J.Blow didn't put a new barrel in his _______ and it worked just fine.
Sometimes it will work and some times it won't. You see the breach-face on the slide has different dimensions on a 9mm slide versus a 40 slide. The firing pin needs to be in the center of the breach face and the extractor needs to be able to put tension on the case rim. You cannot get both things when trying to shoot a 9mm from a gun with a 40 slide. This holds true for 1911's, Glock's, and M&P's.
Like I said though some times you may get lucky and a gun will run most of the time when doing this or you may get light primer hits or FTEs, you just cannot predict it.
Now if you wanted to get a whole new top end that would work just fine in the M&P the frames are the same and the best I can tell the ejectors are the same as well, so all you would have to do is slide one off and the other on.