What are the similarities between class and structure?

Answers were Sorted based on User's Feedback



What are the similarities between class and structure?..

Answer / chhatrala

-> Both can have constructors, methods, properties , fields,
constants , enumerations, events and event handlers.

-> Structure and class can implement inteface.

-> Both of them can have constructor without parameter and
with parameter.

-> Both can have delegates and events.

Is This Answer Correct ?    20 Yes 9 No

What are the similarities between class and structure?..

Answer / satyambabu

class is a collection of methods functions and properties
enumerators and fields.

structure can be defined as a tool for handling a group of
logically related data item.

the main difference is class is a referance type.
structure is a reference value type.

Is This Answer Correct ?    8 Yes 4 No

What are the similarities between class and structure?..

Answer / shilpa


Question What are the similarities between class and
structure?
Rank Answer Posted By
Question Submitted By :: Chhatrala
This Interview Question Asked @ Ksb
I also faced this Question!! ? ALL Interview .com
Answer -> Both can have constructors, methods,
properties , fields,
constants , enumerations, events and event handlers.

-> Structure and class can implement inteface.

-> Both of them can have constructor with parameter.

-> Both can have delegates and events.

Is This Answer Correct ?    5 Yes 1 No

What are the similarities between class and structure?..

Answer / sanjivani

Both are same except the followings
class is ref type and structure is val type
class objects get stored on heap and structure objects get
stored on stack...
and structure should only have parameter less constructors

Is This Answer Correct ?    2 Yes 2 No

What are the similarities between class and structure?..

Answer / cha

yes

Is This Answer Correct ?    0 Yes 11 No

Post New Answer

More VB.NET Interview Questions

What is the difference between Dataset and Recordset?

7 Answers   IG, Silicon,


How would you implement inheritance using vb.net?

0 Answers  


What is the difference between Namespace and Assembly?

0 Answers  


What are the difference between dispose(), close(), exit(), end()?

0 Answers  


What is intermediate language in .NET ?

20 Answers   Digital GlobalSoft,






I have an opening for "APRIMO" Developer in Mumbai Location

1 Answers  


What are all the differences between dispose and finalize()?

0 Answers  


What are jagged arrays ?

0 Answers  


Why is the xml infoset specification different from the xml dom?

0 Answers  


Explain how to store decimal data in .net?

0 Answers  


Name some different types of control?

0 Answers  


Define clr?

0 Answers  


Categories