Swap two integers without using a third variable

algorithm, vb.net

Solution

Yes, it's possible:

Dim var1 = 1
Dim var2 = 2
var1 = var1 + var2
var2 = var1 - var2
var1 = var1 - var2

But why do you need it? The code becomes abstruse.

Problem

I have an assignment in which I need to swap two integers without using third variable. I'm not sure how to do this. How would I code this?

Original source