"throw "and "throw new" Exception()
In the above case rethrows the original exception and preserves its original stack trace. It propagates the full stack information to the caller.
In the above case, throws the original exception but resets the stack trace , destroying all stack trace information until your catch block. This means that, it excludes stack information from the point where you called "Throw ex" .
- What are the Default Access Modifiers in C#?
- What is a sealed class in C#?
- What is operator overloading in c#?
- Difference Between Finalize and Dispose Method in C#?
- What is an Object Pool in .Net?
- What is Anonymous type in C#?
- Dynamic type variables Vs Object type variables in C#?
- What is the difference between Array and ArrayList in C#?
- Difference Between Clone() and CopyTo() Array
- What is the use of finally block in C#?