After deleting a registry key, I try to re-create it, in C#.
I sometimes get the error:
"Illegal operation attempted on a registry key that has been marked for deletion."
I tried putting in a delay before re-creating it, but didn't help.
Any tips?