♡ IV ♡
♡ IV ♡
CC#
Created by ♡ IV ♡ on 4/11/2023 in #help
❔ How should I learn programming?
I'm sure this is a common question, but I want to learn game development but am a pretty new C# programmer, how should I go about learning programming? Whenever I look at schooling options I think I could learn this much cheaper online, but then I'm overwhelmed with the books and tutorials. How did you guys learn what do you recommend?
13 replies
CC#
Created by ♡ IV ♡ on 1/19/2023 in #help
❔ properties/constructor question
class Car
{
public string model;
public string color;
public int year;

// Create a class constructor with multiple parameters
public Car(string modelName, string modelColor, int modelYear)
{
model = modelName;
color = modelColor;
year = modelYear;
}
class Car
{
public string model;
public string color;
public int year;

// Create a class constructor with multiple parameters
public Car(string modelName, string modelColor, int modelYear)
{
model = modelName;
color = modelColor;
year = modelYear;
}
Why do we need another variable (model = modelName) ? Why cant we just set it like this
class Car
{
public string model;
public string color;
public int year;

// Create a class constructor with multiple parameters
public Car(model, color, year)
{
}
}
class Car
{
public string model;
public string color;
public int year;

// Create a class constructor with multiple parameters
public Car(model, color, year)
{
}
}
Sorry for such a basic question 🙏
30 replies