Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Several MemoryExtensions.LastIndexOfAnyExcept overloads incorrectly document "first occurrence"

Abierto Apto para principiantes
#136,282 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
83/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

Abre la documentación XML de las sobrecargas enumeradas de MemoryExtensions.LastIndexOfAnyExcept<T> en System.MemoryExtensions y busca la frase “first occurrence”; comprueba si las sobrecargas cercanas contienen la misma redacción copiada. Cambia el texto de returns afectado por “last occurrence” y confirma después la redacción corregida en todas las sobrecargas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area-System.Memory untriaged
Description

The XML documentation for several MemoryExtensions.LastIndexOfAnyExcept<T> overloads contains contradictory wording.

The method summaries correctly state that the methods search for the last index. However, their <returns> sections incorrectly say that the returned index is the index of the first occurrence:

The index in the span of the first occurrence of any value other than those in <paramref name="values"/>.

first occurrence should be changed to last occurrence.

Affected APIs
LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>?

LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values, IEqualityComparer<T>? comparer = null)

There may be additional overloads containing the same copied wording.

Reproduction Steps
  1. Open System.MemoryExtensions in the dotnet/runtime repository.
  2. Locate the XML documentation for the following overloads:
LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>?

LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values, IEqualityComparer<T>? comparer = null)
  1. Inspect the <returns> documentation.
Expected behavior

The <returns> documentation should state that the method returns the index of the last occurrence of a value.

Actual behavior

The <returns> documentation incorrectly states that the method returns the index of the first occurrence of a value.

Regression?

No known regression. This appears to be an existing XML documentation error.

Known Workarounds

No response

Configuration

Not configuration-specific. This issue affects the XML documentation in System.MemoryExtensions.

Other information

No response

Lenguaje dominante
C#
Estrellas
18.4k
Forks
5.7k
Merge medio
2 d 21 h
PR fusionados (30 d)
657

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/runtime

Todos los issues de dotnet/runtime

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.