Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>private</code>, <code>public</code> and <code>protected</code> indicate who can access members of a class. private means no one outside the class can see it. public means everyone can see it. protected is just like private, but subclasses can access it.</p> <pre><code>class Data { private int counter; // only accessible to class functions protected int id; // accessible to class and subclass functions public string name; // accessible from all code } </code></pre> <p><code>abstract</code> means this is not a finished class - it is meant to be used as a base for subclasses. Often there are virtual functions in its definition, functions intended to be "filled in" by a subclass.</p> <pre><code>abstract class Window { // cannot create objects of this class directly // need to create sub class } </code></pre> <p><code>static</code> on the class definition means there's only one global copy. It pretty much reverts the class to an old-style module. <code>static</code> against a member indicates that it is a global member within the class, there is not a different version for every object you make of that class.</p> <pre><code>static class Configuration { // only one instance of the object } class Data { private static int counter; // all Data objects access this one counter private int id; // each Data object has a different id } </code></pre> <p><code>sealed</code> prevents subclasses being created; it can also be applied to individual functions to prevent them being overridden in a subclass.</p> <pre><code>sealed class TelephoneNumber { // cannot create subclass of TelephoneNumber } class Address { public sealed string FormatAddress() { // this function cannot be overridden on a subclass } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload