0% found this document useful (0 votes)
17 views8 pages

100 Rapid Fire DotNet Questions Fresher

This document contains a comprehensive list of rapid-fire .NET interview questions and answers aimed at freshers. It covers fundamental concepts such as .NET, CLR, object-oriented programming principles, and various .NET technologies including Entity Framework, ADO.NET, and ASP.NET Core. The questions also address practical aspects like dependency injection, error handling, and SQL injection prevention.

Uploaded by

varunvvc4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

100 Rapid Fire DotNet Questions Fresher

This document contains a comprehensive list of rapid-fire .NET interview questions and answers aimed at freshers. It covers fundamental concepts such as .NET, CLR, object-oriented programming principles, and various .NET technologies including Entity Framework, ADO.NET, and ASP.NET Core. The questions also address practical aspects like dependency injection, error handling, and SQL injection prevention.

Uploaded by

varunvvc4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Rapid Fire .

NET Interview Questions (Fresher Level)

1. What is .NET?
Answer: .NET is a free, open-source developer platform created by Microsoft for building many types of applications.

2. What is CLR?
Answer: CLR (Common Language Runtime) manages the execution of .NET programs.

3. What is CTS?
Answer: CTS (Common Type System) defines how types are declared, used, and managed in the runtime.

4. What is CLS?
Answer: CLS (Common Language Specification) is a set of base rules that .NET languages must follow to ensure
interoperability.

5. What is the difference between value type and reference type?


Answer: Value types store data directly; reference types store the address of the data.

6. What is a class?
Answer: A class is a blueprint to create objects in OOP.

7. What is an object?
Answer: An object is an instance of a class.

8. What is a struct?
Answer: A struct is a value type that is used to encapsulate small groups of related variables.

9. What is the Main method?


Answer: It is the entry point of a C# console application.

10. What is an interface?


Answer: An interface defines a contract with no implementation.

11. What is inheritance?


Answer: Inheritance allows one class to acquire properties and methods of another.
Rapid Fire .NET Interview Questions (Fresher Level)

12. What is polymorphism?


Answer: Polymorphism allows methods to do different things based on the object it is acting upon.

13. What is encapsulation?


Answer: Encapsulation is the concept of hiding the internal details and showing only functionality.

14. What is abstraction?


Answer: Abstraction hides complexity by providing a simplified interface.

15. What is method overloading?


Answer: Method overloading is defining multiple methods with the same name but different parameters.

16. What is method overriding?


Answer: Method overriding allows a subclass to provide a specific implementation of a method already defined in its
superclass.

17. What is a constructor?


Answer: A constructor is a method that gets called when an object is created.

18. What is a destructor?


Answer: A destructor is used to perform cleanup before the object is reclaimed by garbage collection.

19. What is the difference between abstract class and interface?


Answer: Abstract classes can have implementation; interfaces cannot.

20. What is static keyword?


Answer: Static defines members that are shared across all instances of a class.

21. What is the difference between const and readonly?


Answer: Const is evaluated at compile time, readonly at runtime.

22. What is a delegate?


Answer: A delegate is a type-safe function pointer.
Rapid Fire .NET Interview Questions (Fresher Level)

23. What is an event?


Answer: An event is a message sent by an object to signal the occurrence of an action.

24. What is a lambda expression?


Answer: A lambda expression is a shorthand for writing anonymous methods.

25. What is LINQ?


Answer: LINQ (Language Integrated Query) provides query capabilities directly in C#.

26. What is anonymous type?


Answer: An anonymous type is a type created without defining a class.

27. What is nullable type?


Answer: A nullable type can represent all values of its underlying type plus an additional null value.

28. What is the var keyword?


Answer: `var` is implicitly typed local variable.

29. What is dynamic type?


Answer: Dynamic types bypass compile-time type checking.

30. What is the difference between is and as operators?


Answer: `is` checks type compatibility, `as` performs safe type casting.

31. What is .NET Core?


Answer: .NET Core is a cross-platform version of .NET for building websites, services, and console apps.

32. What is the difference between .NET Framework and .NET Core?
Answer: .NET Core is cross-platform, lightweight, and modern; .NET Framework is Windows-only.

33. What is a NuGet package?


Answer: NuGet is a package manager for .NET.

34. What is dependency injection?


Rapid Fire .NET Interview Questions (Fresher Level)
Answer: Dependency Injection is a technique to achieve Inversion of Control between classes and their dependencies.

35. What is middleware?


Answer: Middleware is software that's assembled into an app pipeline to handle requests and responses.

36. What is Kestrel?


Answer: Kestrel is a cross-platform web server for ASP.NET Core.

37. What is IConfiguration?


Answer: IConfiguration is an interface for accessing app settings from different sources.

38. What is appsettings.json?


Answer: A file used to store configuration settings in .NET Core applications.

39. What is IOptions pattern?


Answer: Used for accessing strongly typed settings in .NET Core.

40. How do you add a service to DI in .NET Core?


Answer: Use `services.AddSingleton`, `AddScoped`, or `AddTransient` in Startup.cs.

41. What is MVC?


Answer: MVC stands for Model-View-Controller, an architectural pattern.

42. What is Razor?


Answer: Razor is a markup syntax for embedding server-based code into webpages.

43. What is ViewBag vs ViewData vs TempData?


Answer: ViewBag and ViewData pass data from controller to view; TempData persists data for one request.

44. What is Web API?


Answer: A framework to build HTTP services in .NET.

45. What is routing?


Answer: Routing maps URLs to controller actions.
Rapid Fire .NET Interview Questions (Fresher Level)

46. What is attribute routing?


Answer: Routing defined using attributes over controller methods.

47. What is model binding?


Answer: Model binding automatically maps request data to action parameters.

48. How to handle errors in Web API?


Answer: Use try-catch, filters, or middleware for error handling.

49. What is Swagger?


Answer: Swagger is a tool to document and test APIs.

50. How to secure a Web API?


Answer: Use authentication and authorization (e.g., JWT).

51. What is Entity Framework?


Answer: EF is an ORM framework for working with databases using .NET objects.

52. What is DbContext?


Answer: DbContext is the main class for interacting with the database in EF.

53. What is Code First approach?


Answer: In Code First, the model classes are defined first and the database is created from them.

54. How to apply migrations?


Answer: Use `Add-Migration` and `Update-Database` commands.

55. What is lazy loading?


Answer: Related data is loaded only when accessed.

56. What is eager loading?


Answer: Related data is loaded with the main entity using `.Include()`.

57. How do you update a record in EF?


Rapid Fire .NET Interview Questions (Fresher Level)
Answer: Load entity, modify properties, then call `SaveChanges()`.

58. What is the difference between Add and Attach in EF?


Answer: Add marks entity as new; Attach does not mark any changes.

59. What is concurrency in EF?


Answer: Managing simultaneous updates to the same data by different users.

60. What is shadow property in EF Core?


Answer: A property not defined in the entity class but tracked by EF.

61. What is ADO.NET?


Answer: ADO.NET is a set of classes for data access in .NET.

62. What is SqlConnection?


Answer: SqlConnection represents a connection to a SQL Server database.

63. What is SqlCommand?


Answer: SqlCommand is used to execute queries and stored procedures.

64. What is SqlDataReader?


Answer: Used to read data from a data source in a forward-only manner.

65. What is DataSet?


Answer: An in-memory representation of data that can contain multiple DataTables.

66. What is DataAdapter?


Answer: Fills a DataSet and updates the data source.

67. What is ExecuteNonQuery?


Answer: Executes a command that does not return rows (like INSERT, UPDATE).

68. What is ExecuteScalar?


Answer: Executes a command and returns a single value.
Rapid Fire .NET Interview Questions (Fresher Level)

69. How to prevent SQL injection?


Answer: Use parameterized queries.

70. What is a stored procedure?


Answer: A precompiled SQL query stored in the database.

71. What is garbage collection?


Answer: Automatic memory management that reclaims unused memory.

72. What are access modifiers in C#?


Answer: public, private, protected, internal, etc.

73. What is exception handling?


Answer: Mechanism to handle runtime errors using try-catch-finally.

74. What is try-catch-finally?


Answer: Try block handles code, catch handles exception, finally always executes.

75. What is a thread?


Answer: A thread is the smallest unit of execution.

76. What is multithreading?


Answer: Running multiple threads simultaneously.

77. What is async/await?


Answer: Used for asynchronous programming in C#.

78. What is a Task?


Answer: Represents an asynchronous operation.

79. What is a unit test?


Answer: A test that checks individual components for correctness.

80. What is mocking?


Rapid Fire .NET Interview Questions (Fresher Level)
Answer: Creating dummy objects for testing.

81. What is Visual Studio?


Answer: An IDE for developing .NET applications.

82. What is IL code?


Answer: Intermediate Language code generated after compilation.

83. What is JIT compilation?


Answer: Just-In-Time compilation converts IL to machine code at runtime.

84. What is the GAC?


Answer: Global Assembly Cache stores shared .NET assemblies.

85. What is strong naming?


Answer: Assigning a unique name to an assembly using a public/private key pair.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy