Delegate.Remove(Delegate, Delegate) Método
Definição
Remove a última ocorrência da lista de invocação de um delegado da lista de invocação de outro delegado.Removes the last occurrence of the invocation list of a delegate from the invocation list of another delegate.
public:
static Delegate ^ Remove(Delegate ^ source, Delegate ^ value);
public static Delegate Remove (Delegate source, Delegate value);
public static Delegate? Remove (Delegate? source, Delegate? value);
static member Remove : Delegate * Delegate -> Delegate
Public Shared Function Remove (source As Delegate, value As Delegate) As Delegate
Parâmetros
- source
- Delegate
O delegado do qual a lista de invocação de value
será removida.The delegate from which to remove the invocation list of value
.
- value
- Delegate
O delegado que fornece a lista de invocação a ser removida da lista de invocação de source
.The delegate that supplies the invocation list to remove from the invocation list of source
.
Retornos
Um novo delegado com uma lista de invocação formada com o uso da lista de invocação de source
e a remoção da última ocorrência da lista de invocação de value
, se a lista de invocação de value
for encontrada na lista de invocação de source
.A new delegate with an invocation list formed by taking the invocation list of source
and removing the last occurrence of the invocation list of value
, if the invocation list of value
is found within the invocation list of source
. Retorna source
se value
for null
ou se a lista de invocação de value
não for encontrada na lista de invocação de source
.Returns source
if value
is null
or if the invocation list of value
is not found within the invocation list of source
. Retorna uma referência nula se a lista de invocação de value
for igual à lista de invocação de source
ou se source
for uma referência nula.Returns a null reference if the invocation list of value
is equal to the invocation list of source
or if source
is a null reference.
Exceções
O chamador não tem acesso ao método representado pelo representante (por exemplo, caso o método seja privado).The caller does not have access to the method represented by the delegate (for example, if the method is private).
Os tipos de delegado não são correspondentes.The delegate types do not match.
Comentários
Se a lista de invocação value
corresponder a um conjunto contíguo de elementos na lista de invocação do source
, a lista de invocação do value
será mencionada na lista de invocação de source
.If the invocation list of value
matches a contiguous set of elements in the invocation list of source
, then the invocation list of value
is said to occur within the invocation list of source
. Se a lista de invocação value
ocorrer mais de uma vez na lista de invocação de source
, a última ocorrência será removida.If the invocation list of value
occurs more than once in the invocation list of source
, the last occurrence is removed.