GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

C# - Parameters

Lucas Gomes Portugiesisch

Inhalt der Mindmap

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.

Informationen

Beschreibung
Mindmap am C# - Parameters, erstellt von Lucas Gomes am 29/04/2021.
Erstellt von
Lucas Gomes
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck