I have an array
Code
int[] a = {11, 3, 5, 9, 4};
Above you seen an array I want to know that where is the Reference of a is created in the memory.
Also tell me where array elements are created in the memory. int[] a = {11, 3, 5, 9, 4};
Above you seen an array I want to know that where is the Reference of a is created in the memory.
Also tell me where array elements are created in the memory.Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jean PaulRank #32 · 38.5K reputationPosted Nov 26, 2011, 7:45 PM EST
values should be in heap memory.
Sam HobbsRank #107 · 20.5K reputationPosted Nov 26, 2011, 9:30 PM EST
There are very many things for developers to learn. There are many things that we usually do not need to understand. For C# it is important to learn that structs are value types and classes are reference types. The exact details of that is something we usuallu do not need to know.
VulpesRank #55 · 29.2K reputationPosted Nov 27, 2011, 12:45 AM EST