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.Increment
Monitor.Enter
/Monitor.Exit
- Thread-safe access to shared data
Task
vsThread
- Task status and lifecycle (
Status
,IsCompleted
,Faulted
) - Thread construction, data passing
- Thread start limitations
๐งช Pattern Matching
is
pattern withswitch
- List patterns (
[1, 2, ..]
,[.., >5]
, etc.) - Positional and property pattern matching
when
guards
๐งฐ Reflection & Metadata
- Accessing custom attributes like
[Serializable]
AssemblyVersionAttribute
- Reflection APIs (
GetType()
,GetCustomAttributes()
) - Using
dynamic
withActivator.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
MemoryStream
and its behaviorFile.WriteAllText
,FileStream
Seek()
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
ToString
in structs
โ๏ธ Module Initializers
ModuleInitializer
attribute (C# 9+)- Constraints (must be static, parameterless, non-generic)
๐งฉ Dynamic Typing
dynamic
vsvar
- Runtime binding and DLR
- Limitations and performance
๐งพ Assembly & Imports
using
vsglobal using
- File-scoped types (
file class
in C# 11) - Accessibility of file-level types
๐ Access Modifiers and Property Accessors
init
keywordprivate set
,private get
- Constructor behavior with accessors
๐งญ Performance Monitoring and Debugging
PerformanceCounter
- Conditional breakpoints
Debugger.Break()
- Evaluating system metrics
๐ญ Reference Types and Ternary Operators
ref
keyword- 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.