Imagine you have an object like User, where one property is UserName. Say you want to use C# MemoryCache to store some information about that user, and use the UserName string property as the key in the cache.
Will this prevent garbage collection of the User object?
If I understand you correctly, you are saving the value of a property (string in this case) and not an object itself, so your object will be garbage collected.