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. What are the limitations of file based data storing techniques?

Asp .net Facebook app project completion Project Description: We are a small development house in Singapore, and have a project which is 90 percent complete; thus our previou

Requirements: 1.  Complete the following two exercises by developing working csharp projects. 2.  Write a report to explain csharp code written in the projects. 3.  Submi

How does output caching work in ASP.NET?    Output caching is a powerful method that enhances request/response throughput by caching the content generated from dynamic pages. O

What is CLR?  CLR(Common Language Runtime) is the major resource of .Net Framework. It is collection of services such as garbage collector, exception handler, jit compilers etc

What are standard query operators in LINQ? The standard query operators in LINQ are the extension process that forms the LINQ pattern. These operators form an API that enables

What is the purpose of DOTNET? Dot Net Is a collection of products like C#, ASp.Net, Vb.Net, XML. The purpose of .Net is that we can simply upgrade and degrade our programs whi

im retrieving the path of image from the database i want to get the image in that path to be displayed in my datagridviewvolumn

what is the code for calculator in windowsapplication

What are the main components of .NET Framework? .NET Framework gives enormous benefits to software developers in comparison to the advantages given by other platforms. Microsof