Skip to content

Instantly share code, notes, and snippets.

@jaredpar
Last active May 11, 2022 18:33
Show Gist options
  • Save jaredpar/0ce23d39d7414c9d6bc1a44f929fc00d to your computer and use it in GitHub Desktop.
Save jaredpar/0ce23d39d7414c9d6bc1a44f929fc00d to your computer and use it in GitHub Desktop.
  1. ref and ref readonly parameters require the arguments are an lvalue and ...

    1. Use ref as a call site annotation for either
    2. Use in as a call site for ref readonly
    3. Using no annotation is allowed for ref readonly but leads to a warning, for ref it leads to an error
    4. Using out at the call site leads to an error
  2. in parameters require the arguments ...

    1. Use in or no annotation at the call site
    2. Using ref at the call site is allowed but leads to a warning
    3. Using out at the call site leads to an error

Other Items:

  • ref readonly will not be allowed on operators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment