Difference between class and structure, DOT NET Programming

Assignment Help:

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.


Related Discussions:- Difference between class and structure

Delegate, What is a delegate? The Delegate is the class that can hold a...

What is a delegate? The Delegate is the class that can hold a reference to a method or a function. The Delegate class has a signature and it can only reference to those methods

Component diagrams, Explain Component diagrams Package: - The Pa...

Explain Component diagrams Package: - The Package logically make group of element of a UML model. Component: - It is the actual physical module or implementation of

Explain the difference between xml and html., Explain the difference betwee...

Explain the difference between XML and HTML. XML explains data while HTML describes how the data should be displayed. Thus, HTML is about displaying information while XML is ab

Decision making and branching - c# program, Decision Making and Branching -...

Decision Making and Branching - C# Program Need Programming help on Decision Making and Branching in C#.

Explain expandoobject and dynamicobject classes, Explain ExpandoObject and ...

Explain ExpandoObject and DynamicObject classes. The ExpandoObject class refers to a class whose members can be explicitly added and removed at runtime. In other words, the Exp

Differentiate between boxing and unboxing, Differentiate between Boxing and...

Differentiate between Boxing and Unboxing. When a value type is changed to an object type, the process is known as boxing; while, when an object type is changed to a value type

I need c# aac sound receiver over wcf, I need C# AAC sound receiver over WC...

I need C# AAC sound receiver over WCF Project Description: I want a WCF method which is able to receive a byte stream of an AAC sound file from iPhone device and save it on t

What is strong-typing versus weak-typing, What is strong-typing versus weak...

What is strong-typing versus weak-typing? Which is preferred? Why? Strong type is checking the types of variables as soon as possible, usually at compile time. While weak typing

Explain dataset accept changes, Explain Dataset Accept Changes and Data Ada...

Explain Dataset Accept Changes and Data Adapter Update methods?  Data Adapter Update method Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd