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
NameSpace Namespace consists of 2  main basic functionality :- NameSpace Logically types group , ex. System.Web.UI logically groups our UI related features. In Object O

Explain MVC and how it is diffrennt from Asp.net

What are satellite assemblies? We use resource files to store data according to the localized languages. But when you actually go for the deployment you will not like to also i

Explain different software development life cycles. The System Development Life Cycle (SDLC) is the overall process of developing information systems through multi stage proces

I want to prepare one web based application which have student registration and according to semester and every time it will change as per semester change according, now student ge

I want Text/Image printing Counter Project Description: Need your help in our C# programming project. We need to pass this project in two weeks starting from now to pass our

Question: (a) Write extract codes to show the structure of the Global.asax file. (b) Outline four classes that allow you to work with File Streams. (c) When working with

31: Need to develop Doctor Appointments application in .NET Project Description: I am seeking a .NET Web application which can do the subsequent: 1. Taking doctors and

current available topics on computer graphics

What' is the sequence in which ASP.NET events are processed? The sequence in which the ASP.NET events occur are as folows :- 1.     Page_Init. 2.     Page_Load. 3.