suppose I have an object user and I cannot edit its class. How can I add a simple property like username to the object?
Currently my implementation is a simple wrapper that is constructed using a user. The user then becomes a property of my wrapper object and the wrapper object contains a property named username. But it seems to me this is not the correct way to do it. Note the user object is not a dependencyobject and furthermore I am aware that extension method exists, but I do not believe extension method exists, but I need to store the username, so it cannot be static.
Any advice would be very welcome.