Showing posts from June, 2023
The program defines three delegate types: voidDelegate, voidDelegateWithParam, and voidDelegateWithParamOrReturn. These delegate types represent references to methods with a particular parameter list and return type. The voidDelegate delegate type re…
Artificial intelligence (AI) is rapidly changing the world, and .NET technologies are no exception. In the future, we can expect to see AI being used to automate tasks, improve decision-making, and create new and innovative applications. One of the mo…
What is a Delegate? Delegate Declaration Delegate Instantiation Multicast Delegates Delegate vs Interface Conclusion What is a Delegate? Delegates are a powerful feature in C# that allow you to treat methods as objects. This means that you can pass me…
Yes, by calling GC.COLLECT() method we can force garbage collector to run, but this is not recommended, instead use Dispose method. However, you can suggest to the GC that it might be a good time to perform garbage collection by using the GC.Collect()…
The terms "process" and "thread" refer to different concepts in the context of computer programming and operating systems. Here's an explanation of the difference between a process and a thread: A process is an instance of a …
In this blog, we create two threads: thread1 and thread2 . Each thread is assigned a different task: CountNumbers and PrintMessage . Both tasks involve printing some output with a delay of 1 second using Thread.Sleep to simulate work. Multi-threadi…
Differences Between Task And Thread The Thread class is used for creating and manipulating a thread in Windows . A Task represents some asynchronous operation and is part of the Task Parallel Library, a set of APIs for running tasks asynchronousl…
The async keyword is used to mark a method as an asynchronous method. The await keyword is used to pause the execution of an asynchronous method until a specified operation completes. The role of "async" and "await" keywords in C#…
C# and .NET are closely related but represent different concepts in the software development world. Here's the difference between C# and .NET: What is C#? C# is an object-oriented programming language which runs on the .NET framework. C# is a …
Code best practices are guidelines and recommendations that help developers write high-quality, maintainable, and efficient code. They are derived from industry experience, software development principles, and common patterns. Here are some key code…
In software development, SOLID is an acronym that represents a set of principles for designing well-structured and maintainable object-oriented code. The SOLID principles help in achieving code that is easier to understand, test, and maintain. These…