Skip to content

Refactoring to generate ArgumentOutOfRange checks on numeric types #37653

@jnm2

Description

@jnm2

An initial default condition of foo <= 0 seems like a good starting point.

If the argument name contains 'index' and there's a collection parameter, maybe foo < 0 || collectionParameter.Count <= foo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEFeature RequestIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type

    Projects

    Status

    Complete

    Status

    Completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions