Ok, gonna risk the trollbait in hopes that this is just a really really stupid but legitimate question.
Lets get things straight before we go into any detail or ask any other questions: YOUR COMPUTER WILL NOT LAST 5-10 YEARS WITHOUT UPGRADES AND STILL BE VIABLE FOR SERIOUS GAMING"
. It just won't, OK? Doesn't matter how much money you throw at it.
Ok, with that out of the way, a very expensive
and well built
system can last 5-7 years with upgrades along the way
My computer is now 4 years old. It received a CPU upgrade last year and I am currently in the process of buying a GPU upgrade. I'd say I've got another 2-3 years on this rig before it's time to be retired. Upgrading on the same platform at that point would be impractical (would cost the same as just building an entirely new, better rig). FYI this was a pretty darn expensive rig.
It's also recieved a few non-essential or unrelated upgrades along the way (extra hard drives, a new pump... all stuff that I could do without and it would still be good for your gaming and "normal" stuff), so you can just forget about this paragraph entirely
Now, theres something you should know. Things get both better and cheaper, all the damn time. my 12GB of 2000MHZ ram was the fastest and highest capacity you could possibly put in a consumer system at the time. It cost me well over $600 bucks. You can now buy 24GB of faster ram for under $300.
What does this mean? It means buy what will suit your needs for the next 2-3 years, and when it gets old, great, replace it then. Don't try to buy the very top of the line in an attempt to make it last longer - it might sort of work for that goal for a little while, but it will cost a lot more than just upgrading along the way.
That said, don't go el-cheapo either. You don't want to upgrade within the same generation (or even every other generation, unless you're made of money, or can reliably sell your old stuff right before each new cycle or fund your upgrades). It's all about striking a balance.
And remember, at the end of the day, everything becomes obsolete. Sooner or later, no matter how good your stuff is, and how much up upgrade it, you will eventually need to just toss the whole thing and start fresh.