C#-Anfängerfunktion [Duplikat]
Posted: 13 Jan 2025, 10:48
qq alle. Ich bin C#-Anfänger. Warum dieser Code:
Gib Folgendes aus:
1
Und nicht Folgendes:
10
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;
}
}
1
Und nicht Folgendes:
10