Difference between class and structure, DOT NET Programming

What is the difference between Class and structure's?

The main differences between them are as follows:-

1) The Structure is value types while classes are reference types. Hence structures use stack and classes use heap.

2) The Structures members can not be declared as protected, while the class members can be. You can not do inheritance in the structures.

3) The Structures do not require constructors but classes require.

4) The Objects created from classes are terminated using Garbage collector. While Structures are not destroyed using GC.

Posted Date: 9/22/2012 3:12:39 AM | Location : United States







Related Discussions:- Difference between class and structure, Assignment Help, Ask Question on Difference between class and structure, Get Answer, Expert's Help, Difference between class and structure Discussions

Write discussion on Difference between class and structure
Your posts are moderated
Related Questions
1  Assignment Description   This is an individual assignment. Students are referred to the Faculty's policy on plagiarism.  In this assignment you will build a prototype of a si

Create page website to catalog some of the music: A homepage:  that automatically comes up when you go to 127.0.0.1:3000 (instead of the default Ruby-on-Rails pa

Give a small explanation of all Elements in the diagram. Action State: - This is a type of state that has an internal action and one outgoing event that would do the int

Give a brief introduction to Binders. Binders are used by DLR to communicate with not the .NET Framework but also with a variety of other services, like Silverlight and COM. Th

What advantages have Web services over Component Object Model (COM) and Distributed Component Object Model (DCOM)? The benefits of Web services over COM and DCOM are as follow

Change an web Admin panel into multilingual admin panel Project Description: Hello, We have already built a admin panel where only English is the presently supported language

I need Kinect Fitting Room - Smart Fitting Mirror I'm presently looking for someone able to create software exactly like this fitnect (Kinect Fitting Room). Software can work

We would like you to develop the subsequent requirements in one plug-in already in production. The plug-in was developed in Visual Studio 2010 .NET Framework 4 C# and synchronizes

Slide Bettween Window Application 1 Project Description: Like Mouse Gesture. Keep Right Mouse, Slide Left and drop right mouse. Move to earlier app on taskbar. Keep Lef

Question: (a) One problem encountered when designing web applications is that HTTP is a "stateless" protocol. Explain two general approaches to solve the statelessness problem