Add office photos
Engaged Employer

Northcorp Software

4.4
based on 409 Reviews
Video summary
Filter interviews by

10+ Hirect Interview Questions and Answers

Updated 30 Jan 2025
Popular Designations

Q1. What is the difference between readonly and const in C#?

Ans.

readonly variables can be assigned a value either at the time of declaration or in the constructor, while const variables must be assigned a value at the time of declaration and cannot be changed.

  • readonly variables can be assigned a value at runtime, while const variables must be assigned a value at compile time

  • readonly variables can be assigned a value in the constructor, while const variables cannot

  • const variables are implicitly static, while readonly variables are not

Add your answer

Q2. What is garbage collection in .NET?

Ans.

Garbage collection in .NET is an automatic memory management process that helps in reclaiming memory occupied by objects that are no longer in use.

  • Garbage collection is a process where the runtime environment automatically deallocates memory that is no longer needed by the program.

  • It helps in preventing memory leaks and improving the performance of the application.

  • Garbage collection in .NET uses generations to categorize and manage objects based on their lifetime.

  • Examples of ...read more

Add your answer

Q3. What is D/W array and ArrayList in .Net?

Ans.

D/W array is a dynamic array in .Net that can grow or shrink in size. ArrayList is a collection class that can store objects of any type.

  • D/W array is a resizable array that automatically adjusts its size as elements are added or removed.

  • ArrayList is a collection class that can store objects of any type, allowing for flexibility in data storage.

  • Example: D/W array - string[] myArray = new string[5]; ArrayList - ArrayList myArrayList = new ArrayList();

Add your answer

Q4. const is compile-time constant, while readonly is runtime constant.

Ans.

const is compile-time constant, while readonly is runtime constant.

  • const values are determined at compile time and cannot be changed during runtime

  • readonly values can be assigned a value either at the declaration or in the constructor and can be changed at runtime

  • const is used for values that are known at compile time, like mathematical constants

  • readonly is used when the value needs to be initialized at runtime, like database connection strings

Add your answer
Discover Hirect interview dos and don'ts from real experiences

Q5. Injecting Dependencies instead of creating them.

Ans.

Injecting dependencies allows for better flexibility, testability, and maintainability in code.

  • Injecting dependencies means passing objects that a class needs rather than creating them within the class.

  • This allows for easier testing by mocking dependencies and swapping them out for different implementations.

  • Dependency injection frameworks like Unity, Ninject, or Autofac can help manage dependencies.

  • Example: Instead of creating a database connection within a class, pass it in ...read more

Add your answer

Q6. What is Dependency injection ?

Ans.

Dependency injection is a design pattern where components are given their dependencies rather than creating them internally.

  • Dependency injection helps in achieving loose coupling between classes.

  • It allows for easier testing and maintenance of code.

  • There are three types of dependency injection - constructor injection, setter injection, and interface injection.

  • Example: Instead of creating an instance of a class within another class, the instance is passed as a parameter to the ...read more

Add your answer

Q7. Difference between async and await?

Ans.

Async is used to define a method that can be run asynchronously, while await is used to pause the execution of an async method until a task is complete.

  • Async is used to define a method that can be run asynchronously.

  • Await is used to pause the execution of an async method until a task is complete.

  • Async methods can be called using the await keyword to run them asynchronously.

  • Async and await are used in C# to simplify asynchronous programming.

Add your answer

Q8. async defines, await pauses execution.

Ans.

async defines, await pauses execution in asynchronous programming in C#.

  • async keyword is used to define a method as asynchronous in C#.

  • await keyword is used to pause the execution of an asynchronous method until the awaited task completes.

  • Asynchronous programming allows non-blocking execution of code, improving performance and responsiveness.

  • Example: async Task<int> GetDataAsync() { await Task.Delay(1000); return 1; }

Add your answer

Q9. What is CLR in .NET?

Ans.

CLR stands for Common Language Runtime, it is the virtual machine component of the .NET framework.

  • CLR is responsible for managing the execution of .NET programs.

  • It provides services such as memory management, exception handling, and security.

  • CLR compiles the intermediate language code into native code during execution.

  • It allows for cross-language integration and interoperability within the .NET framework.

  • Examples of languages that run on the CLR include C#, VB.NET, and F#.

Add your answer

Q10. Common Language runtime.

Ans.

Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET framework, responsible for managing execution of .NET programs.

  • CLR provides various services such as memory management, exception handling, and security.

  • It compiles intermediate language code into machine code during execution.

  • CLR allows for interoperability between different languages in the .NET framework.

  • Example: C# and VB.NET code can be compiled into a common intermediate language (CIL) an...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Hirect

based on 6 interviews
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top DOT NET Developer Interview Questions from Similar Companies

4.0
 • 17 Interview Questions
5.0
 • 16 Interview Questions
2.9
 • 14 Interview Questions
3.9
 • 11 Interview Questions
3.6
 • 10 Interview Questions
4.0
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter