O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

C# - Parameters

Lucas Gomes Português

Conteúdo do mapa

C# - Parameters

  1. Parameters are used to pass values or variable references to methods. The parameters of a method get their actual values from the arguments that are specified when the method is invoked. There are four kinds of parameters: value parameters, reference parameters, output parameters, and parameter arrays.

  2. Value Parameters

    • A value parameter is used for passing input arguments. A value parameter corresponds to a local variable that gets its initial value from the argument that was passed for the parameter. Modifications to a value parameter don't affect the argument that was passed for the parameter.
  3. Reference Parameters

    • A reference parameter is used for passing arguments by reference. The argument passed for a reference parameter must be a variable with a definite value. During the execution of the method, the reference parameter represents the same storage location as the argument variable. A reference parameter is declared with the ref modifier.
  4. Output Parameters

    • An output parameter is used for passing arguments by reference. It's similar to a reference parameter, except that it doesn't require that you explicitly assign a value to the caller-provided argument. An output parameter is declared with the out modifier.
  5. Parameter Arrays

    • A parameter array permits a variable number of arguments to be passed to a method. A parameter array is declared with the params modifier. Only the last parameter of a method can be a parameter array, and the type of a parameter array must be a single-dimensional array type.

Informações

Descrição
Mapa Mental sobre C# - Parameters, criado por Lucas Gomes em 29-04-2021.
Criado por
Lucas Gomes
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?