Structs are largely redundant in c++. Why does c# have them?



Structs are largely redundant in c++. Why does c# have them?..

Answer / Shivani Ranjan

Structs in C# offer some benefits such as value type semantics, automatic memory management for small objects, and usefulness with certain scenarios like enumerations, arrays, and P/Invoke.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is gac? How to put assembly in gac?

1 Answers  


Can a class have static constructor?

1 Answers  


What is hashtable in c# with example?

1 Answers  


Why do we use class in c#?

1 Answers  


Explain about Threading Types.

1 Answers   DELL,


Can struct inherit from class c#?

1 Answers  


What is cls, cts and clr in net?

1 Answers  


Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why ?

1 Answers  


What are the features of c#?

1 Answers  


Explain About .NET Remoting and types of remoting

1 Answers  


How will U encapsulate button trigger event into text_box event of Pressing Enter key?

3 Answers   TCS,


What are generations and how are they used by the garbage collector?

1 Answers  


Categories