i read about the struct variables in the memory and i didnt understand
when i calls to struct that i made for example :
Code:
public struct CarType
{
private string Color;
private string car_type;
private string car_model;
private int speed;
private bool starter;
public void SetColor(string Color)
{
this.Color = Color;
}
}
then the compiler automaticly creat 5 copy of the variables(from the struct) in the stack? or it creat a copy of the variables only when i calls method that use a variable from the struct , for example
Code:
public void SetColor(string Color)
{
this.Color = Color;
}