I have a linked list that takes any object, and puts it a struct with some other params:

Let's say:

public VList(Object Data);

passes it to

public struct VData
public double ID;
public Object Data;
So when you want to retreive it you create a struct, pass it as a ref, and take the struct.data part.

Lets say:

struct Vals
public string a;
public string b;
public string c;
public string d;

[ creating instances and stuff]


List.Find(id, ref vdata);

vals = (Vals) vdata.Data;

THis actually worked till I changed some code on the list's library (not really had to do with all these).

Now it sends an InvalidCastException like "Specified cast is not valid."

What's wrong with it?