The problem here is the function ExecuteAddtion is not passing the result to the main class variable sum.
No, the problem is that you're expecting the two completely separate objects to magically communicate just because their types are related. It's no different from creating two integers, incrementing one, and expecting the other to be incremented too even though you did nothing with it.