Programming Structures: Classes.

[FX]Roman

Gawd
Joined
Apr 16, 2002
Messages
819
Hello all,

I'm having a bit of a struggle with grasping how a class works. I know that in most cases (syntax aside) that creating and calling a class is generally similar, however, I'm finding it a bit difficult to find any good tutorials to break it down for me.

Currently, I'm working with ASP (bleh), but anything really would be greatly appreciated!
Many thanks in advance!
 
Thank you for the reply, calebb; I'll have a gander as soon as possible, it looks hefty.
If anyone else has a comment, please weigh in, too! :);)

Many thanks!
 
In general, structs are simple data types with all their internal variables exposed, and classes encapsulate their values.

Getting any more specific requires choosing a language.

In .Net, the default visibility is public in a struct and private in a class. Structs are value types that can’t inherit from anything but object, which they always do implicitly. Also, all structs you make in .Net should be immutable.

Classes have state and try to hide their internals. They need an identity that makes them "unique" (this is my class, there are many like it, but this one is mine).
 
Back
Top