What are the similarities between class and structure?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Explain the advantage of option strict on?
How do you do multithreading application in VB ?
Define cls?
What is visual basic.net culture?
What is internal keyword in .net framework?
What is misl code?
How do you script this scenario in QTP using VB? Verify XML attributes in XML message against XSD and data mapping of fields to Oracle tables? Verify data in XML to data in a defined table?
What is an abstract class?
What is the DIfference between Friend and Protected Friend?
6 Answers CTS, Sykes Enterprises, TCS,
What is DLL HELL in VB.NET
What is the main use of a namespace?
Is it necessary to have SQL server installed in your computer in order to create a service based database in vb.net?