Posted by: Amit Andharia | January 2, 2009

C# Keywords & Terminology

 

  • Access modifier: A keyword, such as private, protected, internal, or public, that restricts access to a type or type member.
  • Accessible member: A member that can be accessed by a given type. An accessible member for one type is not necessarily accessible to another type.
  • Accessor: A method that sets or retrieves the value of a private data member value that is associated with a property. Read-write properties have get and set accessors. Properties that are read-only have only a get accessor.
  • Anonymous method: An anonymous method is a code block that is passed as a parameter to a delegate.
  • Base class: A class that is inherited by another ‘derived’ class.
  • Call stack: The series of method calls leading from the beginning of the program to the statement currently being executed at run time.
  • Class: A data type that describes an object. Classes contain both data, and the methods for acting on the data.
  • Constructor: A special method on a class or struct that initializes the objects of that type.
  • Delegate: A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method.
  • Derived class: A class that uses inheritance to gain, augment, or modify the behavior and data of another ‘base’ class.
  • Destructor: A special method on a class or struct that prepares the instance for destruction by the system.
  • Event: A member of a class or struct that sends notifications of a change.
  • Field: A data member of a class or struct that is accessed directly.
  • Generics: Generics allow you to define a class and or method that are defined with a type parameter. When client code instantiates the
    type, it specifies a particular type as an argument.
  • IDE: Integrated Development Environment. The application that provides the unified user interface for the various development tools including the compiler, debugger, code editor, and designers.
  • Immutable type: A type whose instance data, fields and properties, does not change after the instance is created. Most value types are immutable.
  • Inaccessible member: A member that cannot be accessed by a given type. An inaccessible member for one type is not necessarily inaccessible to another type.
  • Inheritance: C# supports inheritance, so a class that derives from another class, known as the base class, inherits the same methods and properties. Inheritance involves base classes and derived classes.
  • Interface: A type that contains only the signatures of public methods, events, and delegates. An object that inherits the interface must implement all of the methods and events defined in the interface. Classes or structs may inherit any number of interfaces.
  • Iterator: An iterator is a method that enables consumers of a class that contains a collection or array to use foreach, in (C# Reference) to iterate through that collection or array.
  • Member: A field, property, method, or event declared on a class or struct.
  • Method: A named code block that provides behavior for a class or struct.
  • Mutable type: A type whose instance data, fields and properties, can be changed after the instance is created. Most Reference Types are mutable.
  • Nested type: A type declared within the declaration of another type.
  • Object: An instance of a class. An object exists in memory, and has data and methods that act on the data.
  • Property: A data member accessed by means of an accessor.
  • Refactoring: Reusing previously entered code. The Visual C# Express Code Editor can intelligently reformat code to, for example, turn a block of highlight code into a method.Reference type: A data type. A variable declared as a reference type point to a location where data is stored.
  • Static: A class or method declared as static exists without first being instantiated using the keyword new. Main() is a static method.
  • Struct: A compound data type that is typically used to contain a few variables that have some logical relationship. Structs can also contain methods and events. Structs do not support inheritance but they do support interfaces. A struct is a value type, while a class is a reference type.
  • Value type: A value type is a data type that is allocated on the stack, as opposed to a reference type which is allocated on the heap. The built-In types, including the numeric types as well as the struct type and the nullable type, are all value types. The class type and string type are reference types.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: