C# High-Level Assessment Topics
This page outlines the major topics covered in an advanced-level C# test, organized to help you review or create educational content. Each section represents a key area tested in the exam.
๐งต Threading & Concurrency
Interlocked.IncrementMonitor.Enter/Monitor.Exit- Thread-safe access to shared data
TaskvsThread- Task status and lifecycle (
Status,IsCompleted,Faulted) - Thread construction, data passing
- Thread start limitations
๐งช Pattern Matching
ispattern withswitch- List patterns (
[1, 2, ..],[.., >5], etc.) - Positional and property pattern matching
whenguards
๐งฐ Reflection & Metadata
- Accessing custom attributes like
[Serializable] AssemblyVersionAttribute- Reflection APIs (
GetType(),GetCustomAttributes()) - Using
dynamicwithActivator.CreateInstance - Loading assemblies via
Assembly.LoadFile
๐ Regular Expressions
- Matching US phone numbers
- Anchors (
^,$) - Quantifiers (
{3},*,+,?) - Special characters (literal vs control)
- Splitting camel case strings
๐ง File I/O & Streams
MemoryStreamand its behaviorFile.WriteAllText,FileStreamSeek()vsPosition- Overwriting vs appending files
- Directory operations and locking
โก Events & Delegates
- Declaring and invoking
EventHandler - Null-safe invocation using
?.Invoke() - Thread-safe event raising
- Multicast delegate behavior
- Event subscription duplication
๐งฎ Math & Generic Constraints
INumber<T>(C# 11+ / .NET 7+)- Generic math in .NET
where T : notnull, INumber<T>- Type safety in generic methods
- Null handling in generics
๐ Security Algorithms
- AES, RSA: secure algorithms
- DES, 3DES: deprecated algorithms
- SHA: hashing, not encryption
๐ค String & Regex Methods
Replace,ToUpper,Normalize- Regex for pattern validation
๐งฑ Structs vs Records
- Use cases
- Value vs reference semantics
- Equality behavior
- Inheritance restrictions
- Record struct mutation (
with, init-only props) - Overriding
ToStringin structs
โ๏ธ Module Initializers
ModuleInitializerattribute (C# 9+)- Constraints (must be static, parameterless, non-generic)
๐งฉ Dynamic Typing
dynamicvsvar- Runtime binding and DLR
- Limitations and performance
๐งพ Assembly & Imports
usingvsglobal using- File-scoped types (
file classin C# 11) - Accessibility of file-level types
๐ Access Modifiers and Property Accessors
initkeywordprivate set,private get- Constructor behavior with accessors
๐งญ Performance Monitoring and Debugging
PerformanceCounter- Conditional breakpoints
Debugger.Break()- Evaluating system metrics
๐ญ Reference Types and Ternary Operators
refkeyword- Conditional expressions with
ref - Referencing array elements conditionally
๐ Implementing IEnumerable
yield return- Interface implementation
- Iterator patterns
๐ Tip:
You can use this structure to create individual Markdown pages or flashcards for focused study or learning resources.