Q:

Prevent showing dll source on exceptions

I have some custom build dll libraries that I have build them myself. Obviously I have some error handling in my code and I throw custom exceptions
If(Error)
     throw new Exception("Something went wrong!");

The problem is that when an application uses the library and an exception that I have defined is thrown, Visual studio shows the source code of dll library at the point that exception is thrown.
Is there a way to prevent showing the source code that visual studio show the break point to the application itself, i.e. the method that is called that causes this exception?
Example:
If System.File.WriteAllText throws exception the code does not show the source code of System.IO.dll it throws the exception on my own code

A:

As  Hans Passant Suggested. I must use the Release version of the dll to hide the source code from being shown.

