Fact.SetValue(object) method
Assigns a value to this object.
Namespace : ielib
Assembly : ielib.dll
public void SetValue(object aValue)ParametersType : System.object.
aValue : the object represents the value to use.
This method is used to assign a value to the Fact object.
For a Boolean type Fact: we can assign one of 2 Boolean values true or false.
Exemple : A fact which represents the question if there are French restaurants?
Fact f = new Fact("French restaurants", Fact.DataType.Bool, null);
f.SetValue(true);
For a real type Fact: we can assign an real value.
Exemple : A fact which represents the amount of money to be placed.
Fact f = new Fact("amount to be placed", Fact.DataType.Real, null);
f.SetValue(10000.0);
For a fact of type symbol: we must assign a string representing one of symbols of the Fact object.
Exemple : A fact is an area that has 3 symbols.
Art, politics or
Science to choose one among the 3, in this example, it is
Art that we respond.
Fact f = new Fact("Domain", Fact.DataType.Symbol, null);
f.AddSymbol("Art");
f.AddSymbol("Politics");
f.AddSymbol("Science");
f.SetValue("Art");
For all fact types: we can assign a string "Unknown" that represents an unknown value.
Exemple : We do not know the amount of money to be placed, we allocate a string "Unknown", that wants to say
I do not know
Fact f = new Fact("amount to be placed", Fact.DataType.Real, null);
f.SetValue("Unknown");
When it assigns a null value, that means that it resets a Fact.
f.SetValue(null);