public IndexableField[] getFields(String name) {List<IndexableField> result = new ArrayList<>();for (IndexableField field : fields) {if (field.name().equals(name)) {result.add(field);}}return result.toArray(new IndexableField[result.size()]);}
public IIndexableField[] GetFields(string name){var result = new List<IIndexableField>();foreach (IIndexableField field in fields){if (field.Name.Equals(name, StringComparison.Ordinal)){result.Add(field);}}return result.ToArray();}