IndexOf

Método MathBlock.IndexOf

Determina el índice de un elemento matemático específico en la colección.

public int IndexOf(IMathElement item)
ParámetroTipoDescripción
itemIMathElementEl elemento a localizar en la colección.

Valor de Retorno

El índice de item si se encuentra en la colección; de lo contrario, -1.

Ejemplos

Ejemplo:

[C#]
MathBlock mathBlock = new MathBlock(new MathematicalText("x"));
MathematicalText plusElement = new MathematicalText("+");
mathBlock.Add(plusElement);
mathBlock.Add(new MathRadical(new MathematicalText("x"), new MathematicalText("3")));
int index = mathBlock.IndexOf(plusElement);

Vea También