I am using dictionary for storing ID,otherID and bool value. Unfortunately it compares array reference, therefore I cannot use it.
Is there any way how to have an array as key but compare its values instead of reference?
Thanks
I am using dictionary for storing ID,otherID and bool value. Unfortunately it compares array
Share
You can use the Comparer property of the dictionary to set it to a custom comparer created by you.
EDIT: actually the property is read-only, sorry. You should definitely use the proper constructor: