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
What is a node? A network can have of two or more computers directly linked by some physical medium such as coaxial cable or optical fiber. Such a physical medium is known as L

Need Data Stream from Laptop to Phone Project Description: I have a notepad file that is automatically generated in a set file name and format by acquisition software and wri

How can you identify whether or not any changes are made to the DataSet object as it was last loaded? The DataSet object provides the following two methods to track down the ch

Explain different types of XML Application Programming Interface (API). The following are two main parts of XML parsers: Tree-based API - Compiles an XML document into a tre

I need to Develop a real state website We want a programmer who can create a website using html5, css3, jQuery, php, MySQL. All connected to a CRM to accomplish all the informat

How to use a checkbox in a datagrid? The steps to be done are as follows:- 1)    In the ASPX page you have to add Itemtemplate tag in datagrid. 2) I

Define an array. An array is explained as a homogeneous collection of elements, stored at contiguous memory locations, which can be referred by the similar variable name. All t

What is Windows DNA architecture? The Windows Distributed internet Applications Architecture (DNA) is a Microsoft blueprint for scalable, robust, & distributed business softwar

We have a VB.NET application to organize the edition and creation of dynamic PDF forms (fishing trip logsheet). The fishing vessel parameters are entered once for good in this VB.N

EMR ONC MU2 CERTIFICATION Project Description: We are looking for someone with experience in EMR MU2 certification per ONC needs. If you have experience and participate in