slayer.5995
❔ why does the output return 0
using System;
public class HelloWorld
{
public static void Main(string[] args)
{
Naming n = new Naming("someone", 9);
Console.WriteLine(n.Name + " " + n.Age);
}
}
public class Naming
{
public string Name;
public int Age;
public Naming (string name, int age)
{
name = Name;
age = Age;
}
}
14 replies