KnowledgeBase.Add(Rule) method
Adds a rule to the knowledge base.
Namespace : ielib
Assembly : ielib.dll
public bool Add(Fact f)ParametersType: ielib.Rule.
r: Represents a specified
Rule class object.
Return valueType : System.Boolean.
true If the object is accepted and added in the database, otherwise
false.
Note : Cannot add a value
nullExample :KnowledgeBase kb = new KnowledgeBase(500);
Rule r = new Rule();
bool b = kb.Add(r); // The variable b is equal true
r = null;
b = kb.Add(r); // The variable b is equal false
if (!b)
MessageBox.Show("The value null is not accepted.");
Exception: Syntax error in the construction of the object Premise or Conclusion.