Let’s say we have object A and B that both have a localized string. I want to compare these objects, and they are considered “same” if they have matching localization entries.
I’m trying to compare LocalizedString.TableEntryReference.KeyId and Key.
However, sometimes the other one as Key (the string) defined and KeyId being 0 and the other has it the other way around.
Why is this? It doesn’t seem to be consistent as this started now causing problems for me suddenly as things aren’t considered the same suddenly.
You could first check the ReferenceType, if it matches then you are safe to compare the 2 Keys or Key Ids, if they are not the same then fallback to checking the entries.