C# for Java Programmers Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

flashcard set

Earn XP

Description and Tags

Flashcards covering key vocabulary and concepts from a C# lecture for Java programmers.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

readonly (C#)

Keyword in C#; Equivalent to 'final' in Java.

2
New cards

sealed (C#)

Keyword in C#; Prevents a class from being inherited.

3
New cards

namespace (C#)

Keyword in C#; Equivalent to 'package' in Java for organizing code.

4
New cards

is (C#)

Keyword in C#; Equivalent to 'instanceof' in Java for type checking.

5
New cards

lock x (C#)

Keyword in C#; Equivalent to 'synchronized' in Java; Used for thread synchronization.

6
New cards

~ClassName() (C#)

C# destructor; Called by the garbage collector for clean-up.

7
New cards

Uniform Type System (UTS)

All types inherit from System.Object, allowing List without boxing.

8
New cards

&T (C#)

The type of a managed pointer to T; CLR checks at run-time that it is pointing to the correct type.

9
New cards

*T (C#)

The type of an unmanaged pointer to T; CLR does not perform type checks; Only possible in unsafe blocks.

10
New cards

Structs (C#)

Lightweight objects for holding temporary data; Value types stored on the stack.

11
New cards

Dynamic Typing

Defers binding and dispatch operations to runtime; Designed to support dynamically typed languages.

12
New cards

Properties (C#)

Provide a flexible mechanism to read, write, or compute the value of a private field.

13
New cards

Indexers

Properties that can be indexed, accessed like an array, and implemented as an invisible property Item.

14
New cards

ref (C#)

Keyword used for passing parameters by reference; The reference parameter represents the same storage location.

15
New cards

out (C#)

Keyword used for passing parameters by reference; The variable need not be assigned first.

16
New cards

new (C# modifier)

Modifier used to indicate that a method in a subclass is intentionally hiding a method in the base class.

17
New cards

override (C# modifier)

Modifier used to indicate that a method in a subclass is replacing a virtual method in the base class.

18
New cards

yield return

Used to implement lazy evaluation, returning elements one at a time.

19
New cards

LINQ (Language Integrated Query)

A set of features that enables SQL-like queries from arrays, data structures, and XML documents.

20
New cards

Delegates

Type that represents references to methods with a particular parameter list and return type (similar to function pointers).