This is because you have two classes – one that is handling the Item Updating event and in which the instance level variable is set, and one that is handling the Item Updated event in which the instance level variable is not set.
The first time the Item Updating and Item Updated events fire it is in response to the document properties changing.
The second time they fire it is in response to the document being checked in.
Dangers lurk hidden out there which, if you run into them, can be a blow to your project and waste a great deal of time.
Damon gives just one example of a poisoned dagger in the game of Sharepoint Development: The Item Event Receiver.
What this means is that you cannot store data in instance-level variables and share that data between event handlers.
For example, if you define an instance level variable in the class to store data in the Item Updating event, then try to access that data in the Item Updated event, you will find that the data is not there when you go to check it in the Item Updated event.
You can also use event receivers to validate the data that the user wants to change.
This walkthrough is based on the first one where I have a custom list with planets of our solar system.
If the name isn’t changed, the changes are saved to the Share Point list.
Before you can deploy the event receiver you have to change the file to bind the Update Adding event receiver to all custom lists.
I’m usually disappointed when writers employ oft-overused metaphors to describe a situation.