We give a bound for codes over an arbitrary alphabet in a non-Hamming metric and define MDS codes as codes meeting this bound. We show that MDS codes are precisely those codes that are uniformly distributed and show that their weight enumerators based on this metric are uniquely determined.