OPFService.OPFDictionary.contains C# (CSharp) Метод

contains() публичный Метод

public contains ( string word ) : System.Boolean
word string
Результат System.Boolean
        public Boolean contains(string word)
        {
            return words.ContainsKey(word);
        }

Usage Example

Пример #1
0
 public void handle(Socket client)
 {
     try {
         NetworkStream netStream = new NetworkStream(client);
         StreamReader  istream   = new StreamReader(netStream);
         StreamWriter  ostream   = new StreamWriter(netStream);
         string        command   = istream.ReadLine();
         if (command == "test")
         {
             string password = istream.ReadLine();
             //bool validateRules = dict.validateNumberUppercaseLowercaseSpecialChacacters(password);
             bool containsPassword = dict.contains(password);
             //ostream.WriteLine(validateRules? "false" : "true");
             ostream.WriteLine(containsPassword ? "false" : "true");
             ostream.Flush();
         }
         else
         {
             ostream.WriteLine("ERROR");
             ostream.Flush();
         }
     } catch (Exception e) {
     }
     client.Close();
 }
All Usage Examples Of OPFService.OPFDictionary::contains