diff --git a/ortools/sat/csharp/Constraints.cs b/ortools/sat/csharp/Constraints.cs
index eccadbeb5b..91df404381 100644
--- a/ortools/sat/csharp/Constraints.cs
+++ b/ortools/sat/csharp/Constraints.cs
@@ -161,7 +161,7 @@ public TableConstraint(CpModelProto model) : base(model)
*
* the tuple to add to the constraint
* if the tuple does not have the same length as the array of
- * variables of the constraint
+ * expressions of the constraint
*/
public TableConstraint AddTuple(IEnumerable tuple)
{
@@ -173,9 +173,9 @@ public TableConstraint AddTuple(IEnumerable tuple)
table.Values.Add(value);
count++;
}
- if (count != table.Vars.Count)
+ if (count != table.Exprs.Count)
{
- throw new ArgumentException("addTuple", "tuple does not have the same length as the variables");
+ throw new ArgumentException("addTuple", "tuple does not have the same length as the expressions");
}
return this;
}
@@ -187,7 +187,7 @@ public TableConstraint AddTuple(IEnumerable tuple)
*
* the tuple to add to the constraint
* if the tuple does not have the same length as the array of
- * variables of the constraint
+ * expressions of the constraint
*/
public TableConstraint AddTuple(IEnumerable tuple)
{
@@ -199,9 +199,9 @@ public TableConstraint AddTuple(IEnumerable tuple)
table.Values.Add(value);
count++;
}
- if (count != table.Vars.Count)
+ if (count != table.Exprs.Count)
{
- throw new ArgumentException("addTuple", "tuple does not have the same length as the variables");
+ throw new ArgumentException("addTuple", "tuple does not have the same length as the expressions");
}
return this;
}
@@ -213,15 +213,15 @@ public TableConstraint AddTuple(IEnumerable tuple)
*
* the set of tuple to add to the constraint
* if the tuple does not have the same length as the array of
- * variables of the constraint
+ * expressions of the constraint
*/
public TableConstraint AddTuples(int[,] tuples)
{
TableConstraintProto table = Proto.Table;
- if (tuples.GetLength(1) != table.Vars.Count)
+ if (tuples.GetLength(1) != table.Exprs.Count)
{
- throw new ArgumentException("addTuples", "tuples does not have the same length as the variables");
+ throw new ArgumentException("addTuples", "tuples does not have the same length as the expressions");
}
for (int i = 0; i < tuples.GetLength(0); ++i)
@@ -241,15 +241,15 @@ public TableConstraint AddTuples(int[,] tuples)
*
* the set of tuple to add to the constraint
* if the tuple does not have the same length as the array of
- * variables of the constraint
+ * expressions of the constraint
*/
public TableConstraint AddTuples(long[,] tuples)
{
TableConstraintProto table = Proto.Table;
- if (tuples.GetLength(1) != table.Vars.Count)
+ if (tuples.GetLength(1) != table.Exprs.Count)
{
- throw new ArgumentException("addTuples", "tuples does not have the same length as the variables");
+ throw new ArgumentException("addTuples", "tuples does not have the same length as the expressions");
}
for (int i = 0; i < tuples.GetLength(0); ++i)
diff --git a/ortools/sat/csharp/CpModel.cs b/ortools/sat/csharp/CpModel.cs
index 3370abd4b0..f0bc8b5f0d 100644
--- a/ortools/sat/csharp/CpModel.cs
+++ b/ortools/sat/csharp/CpModel.cs
@@ -420,7 +420,7 @@ public AutomatonConstraint AddAutomaton(IEnumerable expressions, lon
{
AutomatonConstraintProto automaton = new AutomatonConstraintProto();
automaton.Vars.TrySetCapacity(expressions);
- foreach (LinearExpr expr in exprs)
+ foreach (LinearExpr expr in expressions)
{
automaton.Exprs.Add(GetLinearExpressionProto(expr));
}