As the title states; I have (shown below) an array of a Structure type. But attempting to extract data from it isn't working because it is evaluated as type Object. If it's impossible I'd really love a morphism of this if possible.
private Entity makeEntity(params KeyValuePair<String, object>[] fields)
{
Entity entity = new Entity();
IEnumerator cons = fields.GetEnumerator();
Field field;
Value value;
while (cons.MoveNext()){
value = new Value();
value.value = cons.Current.Value;
field = new Field();
field.name = cons.Current.Key;
field.values.Add(value);
entity.fields.Add(field);
}
return entity;
}