Are structs value types or reference types?



Are structs value types or reference types?..

Answer / Etendra Singh Rana

Structs are value types in C#. When a struct is created, it stores the data directly in the variable that holds the struct instance, not as a reference to the memory location.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

how can i get this 123456789 1234 6789 123 789 12 89 1 9

1 Answers   Excel,


Which programming language is best for desktop applications?

1 Answers  


Can I define a type that is an alias of another type (like typedef in c++)?

1 Answers  


What are constructors in c#?

1 Answers  


Why do we use 0?

1 Answers  


What is the difference between yield and return?

1 Answers  


What is overloading and how can this be done ?

4 Answers   MMTS,


Why we use get and set property in c#?

1 Answers  


What is windows application in c#?

1 Answers  


There are a class A. Another class B derived from it. Now if I do A a = new B(); and B b = new B(); What will happen in both the statements. And what is the difference between these two statements.

3 Answers   HCL,


Explain the process of Serialization?

1 Answers  


Explain the term inheritance in C#.

1 Answers   Deloitte, JPMorgan Chase,


Categories