C# interview questions
33 questions across 10 topics, each with the correct answer and an explanation. Free to read.
Object-oriented programming
4 questionsLINQ
4 questionsAsync / await
4 questions- What happens when execution reaches await on a task that hasn't completed yet?
- In what order are the letters printed? (Each WriteLine prints one letter per line.)
- Which async practices are recommended? Select all that apply.
- A desktop app freezes forever when a button handler calls GetDataAsync().Result. Explain why this deadlocks…
Generics
3 questionsDelegates & events
3 questionsCollections
3 questionsMemory & GC
3 questionsASP.NET Core basics
2 questionsDependency injection
4 questions- Which service lifetime gives one instance per HTTP request in ASP.NET Core?
- A teammate describes their service registrations. Highlight the statements that describe a lifetime bug.
- Why use dependency injection? Explain constructor injection and the benefits it brings to an ASP.NET Core app.
- Complete the registration so a new instance is created every time IFoo is resolved:…