Answer the question
In order to leave comments, you need to log in
What is the difference between reference and signed types?
Do I understand correctly that both types store the structure itself (a reference to it) on the stack, but signed ones also store its value on the stack, while reference types store a reference to the heap on the stack. So?
Are there any restrictions on the size of structures? Can I push a file onto the stack?
If I declared a structure,
struct MyStruct
{
//...
}
Is it correct to say that when I create a working object of this structure, I create an instance of it? Or how is it said? Are we "creating a variable with type MyStruct"?
Answer the question
In order to leave comments, you need to log in
Value types store a value, while reference types store a reference to a value. Not significant))
class SSylka
{
public byte Value { get; set; }
}
struct Znachenie {
public byte Value { get; set; }
}
class Program
{
static void Main(string[] args)
{
SSylka _ssylka = new SSylka { Value = 0 };
Znachenie _znachenie = new Znachenie { Value = 0 };
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question