Page 1 of 1

C#-Anfängerfunktion [Duplikat]

Posted: 13 Jan 2025, 10:48
by Guest
qq alle. Ich bin C#-Anfänger. Warum dieser Code:

Code: Select all

using System;
public class HelloWorld
{
public static void Main(string[] args)
{
int a = 1;
FuncTrain(a);
Console.WriteLine("a = " + a);
}

static int FuncTrain(int a)
{
a = 10;
return a;
}
}
Gib Folgendes aus:
1
Und nicht Folgendes:
10