Assuming you are trying to left-shift and assign, and assuming that you do not want collisions, you could do something like this:
// this method will only return a value when this thread's shift operation "won" the race
int GetNextValue()
{
// execute until we "win" the compare
// might look funny, but you see this type of adjust/CompareAndSwap/Check/Retry very often in cases where the checked operation is less expensive than holding a lock
while(true)
{
// if AValue is a 64-bit int, and your code might run as a 32-bit process, use Interlocked.Read to retrieve the value.
var value = AValue;
var newValue = value << 1;
var result = Interlocked.CompareExchange(ref AValue, newValue, value);
// if these values are equal, CompareExchange peformed the compare, and we "won" the exchange
// if they are not equal, it means another thread beat us to it, try again.
if (result == value)
return newValue;
}
}