O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.2. Class members

In addition to instance and static variables, other classes (inner classes), and methods, a C# class can include many other different members. Class members can be divided into two categories:

  • data members

  • function [1] members.

    [1] This is a terminology thing – the word 'function' (as in function member) does not mean just 'methods'. In OO languages, a method is simply another name for 'function', and some OO developers who graduated from traditional structured programming schools still use the term function to refer to method. In C#, function members include methods and properties, events, indexers, operators, instance constructors, destructors, and static constructors.

Members that can contain executable code are known as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required