Saturday, February 6, 2010

.NET classess and structures

What is user-defined data type?

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


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

No comments:

Post a Comment