32  
aspnetcore
Advertisement
Поиск  
Always will be ready notify the world about expectations as easy as possible: job change page
Apr 26

Top 50 ASP.NET Core MVC interview questions

Top 50 ASP.NET Core MVC interview questions
Автор:
Источник:
Просмотров:
286

You can’t miss these 50 questions if you are preparing for interviews.

Last month I was preparing for the interviews and I have collated all the questions from different companies. Although there were many questions but I have picked top 50 that are asked regularly and are highly important for DotNet developer.

  1. What is the purpose of the "static" keyword in C#?
  2. Explain the difference between a static class and a non-static class in C#.
  3. What is Dependency Injection? How it is implemented in ASP.NET Core?
  4. What is the purpose of ‘new’ keyword in c# and in what scenarios you can use it?
  5. In what scenarios would you use a static class in your C# application?
  6. Can you declare a static method within a non-static class? If yes, what does it imply?
  7. What is the difference between Interface and Abstract class? (most important)
  8. Explain the role of a static constructor in a C# class. When is it invoked?
  9. What are Generics in C# & Why we need Generics?
  10. Discuss the advantages and disadvantages of using static members in a class.
  11. What is a static variable? How is it different from an instance variable?
  12. Can you use the "this" keyword inside a static method? Why or why not?
  13. Explain the concept of thread safety in the context of static members. How can you make a static method thread-safe?
  14. What is a static property, and when would you use it? Provide an example.
  15. How would you enforce that a particular method in a non-static class can only be called once in the application lifetime?
  16. Discuss the Singleton design pattern and its relationship with static classes.
  17. Explain the difference between a readonly field and a const field in C#.
  18. When should you use a static class versus a singleton pattern?
  19. How can you prevent inheritance of a static class in C#?
  20. Can you define a non-static method in a static class? If yes, what implications does it have?
  21. What is reflection in C#?
  22. Explain the purpose of the "System.Reflection" namespace.
  23. How do you obtain the type information of a class at runtime using reflection?
  24. What is the difference between early binding and late binding? How does reflection facilitate late binding?
  25. Can you dynamically create an instance of a class using reflection? If so, how?
  26. Explain what a "Type" object represents in C# and how it is related to reflection.
  27. How do you get the list of all methods of a class using reflection?
  28. What is the purpose of the "typeof" operator in C#?
  29. How can you invoke a method dynamically using reflection?
  30. Difference Between ViewData, ViewBag and TempData. (most important)
  31. What is the difference between "GetType()" and "typeof()" in C#?
  32. What is difference between ‘String’ and ‘StringBuilder’ in C#?
  33. How do you enumerate and access properties of a class dynamically through reflection?
  34. What is the purpose of the "Activator" class in relation?
  35. How does reflection deal with performance compared to direct method calls?
  36. Explain the difference between ‘ref’ and ‘out’ in C#?
  37. What is late-bound object creation, and how is it achieved using reflection?
  38. How Garbage Collection works?
  39. What are custom attributes, and how can they be used with reflection?
  40. Explain the security considerations when using reflection in C#.
  41. How can you retrieve the type of an object at runtime using reflection in .NET Core?
  42. Explain the purpose of the "Assembly" class in .NET Core and how it is used with reflection.
  43. Explain Middleware? How it works? Can i make application with no Middleware?
  44. Can you dynamically invoke a private method of a class using reflection in .NET Core? If so, how?
  45. What is the purpose of the "MemberInfo" class in .NET Core reflection?
  46. Explain the difference between "GetType()" and "typeof()" methods in .NET Core.
  47. Explain how can you implement Caching in asp.net core application?
  48. What is the purpose of the "Activator.CreateInstance" method in .NET Core, and how is it used?
  49. What are Areas in MVC?
  50. Explain the role of the "MethodInfo" class in .NET Core reflection.

I Advise everybody to please prepare these questions thoroghly. I am sure these will help you a lot during interviews as well as while working.

Похожее
Mar 29
Author: Colton
These interview questions range from basic to advanced .Net Core, and will assist you in preparing for interviews, revising quickly, and strengthening your technical skills.According to the Stackoverflow Survey 2020,.NET and.NET Core are the second and third most popular frameworks...
Mar 9, 2023
Author: Vithal Wadje
ASP.NET Core Blazor Server is a platform for developing modern and dynamic web applications. With Blazor Server, you can write code in C# and create rich user interfaces using HTML and CSS, all while taking advantage of server-side rendering and...
Jun 8, 2023
Author: Behdad Kardgar
This is my first article about gRPC on ASP.NET 6. In this article, I will give a short introduction to what gRPC is and the different types of communication in gRPC. In the end, I will share a simple console...
Apr 15
Author: Olorundara Komolafe
Scheduling one or more background tasks is almost inevitable when building robust, self-sustaining APIs with .NET. A few packages have been around for years, such as Hangfire and Quartz.NET.ASP.NET Core allows background tasks to be implemented as hosted services. However,...
Написать сообщение
Почта
Имя
*Сообщение


© 1999–2024 WebDynamics
1980–... Sergey Drozdov
Area of interests: .NET Framework | .NET Core | C# | ASP.NET | Windows Forms | WPF | HTML5 | CSS3 | jQuery | AJAX | Angular | React | MS SQL Server | Transact-SQL | ADO.NET | Entity Framework | IIS | OOP | OOA | OOD | WCF | WPF | MSMQ | MVC | MVP | MVVM | Design Patterns | Enterprise Architecture | Scrum | Kanban