The difference between throw and throw ex


throw, reissues the error with the same StackTrace as before. issues exactly the same error as before. But if you use throw ex, it still issues the same error as before, but with one difference, it resets StackTrace! For example ....
Read more

The difference between async and sync


In the previous article, how the Thread Pool works was presented. In this article, we will examine the differences between async and sync methods, what is the difference between these two types, and why we should use async methods. When you write a method in sync ....
Read more

How Thread pool works in C#


When a request sent to asp.net application A thread is created to handle the request. When a thread is created, some resources such as memory are allocated to the thread. Finally, when the job is done, Garbage Collector destroys the object created for the thread ....
Read more

How to use implicit operator and explicit operator in C#


In C#, you can not normally convert or cast classes into an int variable or any other variable, and vice versa. By default, you cannot assign an int number to a class. But you can do this by using implicit operators and explicit operators ....
Read more