I assume that you call ToString in your object reference, but it is not clear that this or your explained situation is TBH, so just carry me.
Does the type provide an ID property? If yes, try the following:
var idAsString = yourObjectInstance.ID.ToString();
Or, type directly:
Console.WriteLine(yourObjectInstance.ID);
EDIT:
I see that John saw this directly through this problem, and my answer looks rather naive - regardless of whether I leave it, if only to emphasize the lack of clarity of the question. And also, maybe suggest skipping down on John’s expression: “This [ GetHashCode ] is still not a unique identifier” if you decide to expose your own uniqueness using an identifier.
source share