|
.NET classess and structures - August 25, 2008 at 18:00 PM by
Amit Satpute
What is user-defined data type?
Answer
A user-defined type is a named data type created by the user. It can
be a distinct type sharing a common representation with some built-in data type
or it can be a structured type which has a sequence of named attributes that
each has a type. Thus based on this it can be categorized as:
-Distinct type
-Structured type
-Reference type
Classes vs. Structures
Answer
The class is an extension of a structure.
Structure members have public access by default
Class member variables are private by default
The keyword for class is class
The keyword for structures is struct
|