• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/10

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

10 Cards in this Set

  • Front
  • Back
A constant is a
class member that represents a constant value: a value that can be computed at compile-time. A constant-declaration introduces one or more constants of a given type.
There are four kinds of formal parameters:
· Value parameters, which are declared without any modifiers.

· Reference parameters, which are declared with the ref modifier.

· Output parameters, which are declared with the out modifier.

· Parameter arrays, which are declared with the params modifier.
As described in §3.6, the ref and out modifiers are part of a method’s signature, but
the params modifier is not.
extension method.
When the first parameter of a method includes the this modifier, that method is said to be anExtension methods can only be declared in non-generic, non-nested static classes. The first parameter of an extension method can have no modifiers other than this, and the parameter type cannot be a pointer type.
A property is a member that
provides access to a characteristic of an object or a class. Examples of properties include the length of a string, the size of a font, the caption of a window, the name of a customer, and so on. Properties are a natural extension of fields—both are named members with associated types, and the syntax for accessing fields and properties is the same. However, unlike fields, properties do not denote storage locations. Instead, properties have accessors that specify the statements to be executed when their values are read or written. Properties thus provide a mechanism for associating actions with the reading and writing of an object’s attributes; furthermore, they permit such attributes to be computed.
An indexer is a member that
enables an object to be indexed in the same way as an array. Indexers are declared using indexer-declarations:
Interfaces can contain
methods, properties, events, and indexers. The interface itself does not provide implementations for the members that it defines. The interface merely specifies the members that must be supplied by classes or structs that implement the interface.
Exception can be thrown in two different ways.
· A throw statement (§8.9.5) throws an exception immediately and unconditionally. Control never reaches the statement immediately following the throw.

· Certain exceptional conditions that arise during the processing of C# statements and expression cause an exception in certain circumstances when the operation cannot be completed normally. For example, an integer division operation (§7.8.2) throws a System.DivideByZeroException if the denominator is zero. See §16.4 for a list of the various exceptions that can occur in this way.
The System.Exception class is
the base type of all exceptions. This class has a few notable properties that all exceptions share:

· Message is a read-only property of type string that contains a human-readable description of the reason for the exception.

· InnerException is a read-only property of type Exception. If its value is non-null, it refers to the exception that caused the current exception—that is, the current exception was raised in a catch block handling the InnerException. Otherwise, its value is null, indicating that this exception was not caused by another exception. The number of exception objects chained together in this manner can be arbitrary.

The value of these properties can be specified in calls to the instance constructor for System.Exception.
Common Exception Classes
4
The following exceptions are thrown by certain C# operations.



System.ArithmeticException
A base class for exceptions that occur during arithmetic operations, such as System.DivideByZeroException and System.OverflowException.

System.ArrayTypeMismatchException
Thrown when a store into an array fails because the actual type of the stored element is incompatible with the actual type of the array.

System.DivideByZeroException
Thrown when an attempt to divide an integral value by zero occurs.

System.IndexOutOfRangeException
Thrown when an attempt to index an array via an index that is less than zero or outside the bounds of the array.

System.InvalidCastException
Thrown when an explicit conversion from a base type or interface to a derived type fails at run time.

System.NullReferenceException
Thrown when a null reference is used in a way that causes the referenced object to be required.

System.OutOfMemoryException
Thrown when an attempt to allocate memory (via new) f