I have an application that runs several asynchronous methods to create messages that are sent with a unique id to a remote host.
Two types of messages are being created in two separate classes.
One class is inherited from the other but the shared methods are shadowed meaning they are different.
I would like the ID to be an incremented integer.
Does anyone have a good way of accomplishing this task?
For whoever downvoted - please shed some light on why? I have looked up the use of static numbers and class generated ids but they don't cover the shared method issue.
I am also aware of a single shared method being able to use a static number but that doesn't help when my method is shadowed.