Structures Containing the Reference type

  • Thread starter Thread starter slalith
  • Start date Start date
S

slalith

Guest
struct MyStruct
{
public string myString;

static void Main(string[] args)
{
MyStruct myVariable = new MyStruct();
myVariable.myString = "Hello"; //This Line
Console.ReadLine();
}
}


Where does myString and myVariable.myString gets Stored? Heap or Stack ?

Continue reading...
 
Back
Top