1/19
Flashcards covering key vocabulary and concepts from a C# lecture for Java programmers.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
readonly (C#)
Keyword in C#; Equivalent to 'final' in Java.
sealed (C#)
Keyword in C#; Prevents a class from being inherited.
namespace (C#)
Keyword in C#; Equivalent to 'package' in Java for organizing code.
is (C#)
Keyword in C#; Equivalent to 'instanceof' in Java for type checking.
lock x (C#)
Keyword in C#; Equivalent to 'synchronized' in Java; Used for thread synchronization.
~ClassName() (C#)
C# destructor; Called by the garbage collector for clean-up.
Uniform Type System (UTS)
All types inherit from System.Object, allowing List
&T (C#)
The type of a managed pointer to T; CLR checks at run-time that it is pointing to the correct type.
*T (C#)
The type of an unmanaged pointer to T; CLR does not perform type checks; Only possible in unsafe blocks.
Structs (C#)
Lightweight objects for holding temporary data; Value types stored on the stack.
Dynamic Typing
Defers binding and dispatch operations to runtime; Designed to support dynamically typed languages.
Properties (C#)
Provide a flexible mechanism to read, write, or compute the value of a private field.
Indexers
Properties that can be indexed, accessed like an array, and implemented as an invisible property Item.
ref (C#)
Keyword used for passing parameters by reference; The reference parameter represents the same storage location.
out (C#)
Keyword used for passing parameters by reference; The variable need not be assigned first.
new (C# modifier)
Modifier used to indicate that a method in a subclass is intentionally hiding a method in the base class.
override (C# modifier)
Modifier used to indicate that a method in a subclass is replacing a virtual method in the base class.
yield return
Used to implement lazy evaluation, returning elements one at a time.
LINQ (Language Integrated Query)
A set of features that enables SQL-like queries from arrays, data structures, and XML documents.
Delegates
Type that represents references to methods with a particular parameter list and return type (similar to function pointers).