public SomeClassThatUsesValueWithId(SerializationInfo info, StreamingContext ctxt)
    {
        string valId = (string)info.GetString("Val");
        CollectionOfValuesWithId col = ctxt.Context as CollectionOfValuesWithId;

        if (col != null)
        {
            Val = col.GetValueFromId(valId);
        }
    }
 public SomeClassThatUsesValueWithId(ValueWithId val)
 {
     Val = val;
 }
 public void AddValue(ValueWithId val)
 {
     Values.Add(val);
 }