public void add(String match, String replacement) {if (match.length() == 0 ){throw new IllegalArgumentException("cannot match the empty string");}if (pendingPairs.containsKey(match)) {throw new IllegalArgumentException("match \"" + match + "\" was already added");}pendingPairs.put(match, replacement);}
public virtual void Add(string match, string replacement){if (match.Length == 0){throw new System.ArgumentException("cannot match the empty string");}if (pendingPairs.ContainsKey(match)){throw new System.ArgumentException("match \"" + match + "\" was already added");}pendingPairs[match] = replacement;}