Hi
I wish to have a UserProfile class for the client of an appication I am working on. As there will be only one UserProfile per client, I would like to implement this as a Singleton.
I would also like to be able to initialise the UserProfile at creation (parameters such as Username, Role etc), and then have it as a read-only object from then on.
Can anyone suggest a way that I can force the use of parameters for the creation, but then not permit the further setting of these parameters at a later stage?
Thanks
I wish to have a UserProfile class for the client of an appication I am working on. As there will be only one UserProfile per client, I would like to implement this as a Singleton.
I would also like to be able to initialise the UserProfile at creation (parameters such as Username, Role etc), and then have it as a read-only object from then on.
Can anyone suggest a way that I can force the use of parameters for the creation, but then not permit the further setting of these parameters at a later stage?
Thanks