Ah yes, this one can be solved that way; oops. My understanding of the literature is that variants are much more problematic, though, and require more complex restrictions on typical Bayesian probability frameworks to exorcise them.
This is one good review, with a proposed solution (from a Bayesian perspective): http://books.google.com/books?id=14_ykEOAZ6AC&pg=PA49
Suppose the amounts in the envelopes are A and B. A Bayesian would say:
Prob(I have A) = 1/2 and Prob(I have B) = 1/2
The expected gain from switching is:
Prob(I have A)x(what I'd gain from switching = B-A) + Prob(I have B)x(what I'd gain from switching = A-B)
which is: 1/2 x (B-A) + 1/2 x (A-B) = 0