public int GetFieldIndex(string name) { int ii = 0; foreach (var f in _fields) { if (f.Name == name) return ii; ++ii; } return -1; }