Δευτέρα, 2 Απριλίου 2007 - Δημοσιεύσεις

Catch... When

Here is a tiny detail in the try/catch syntax of VB.NET you not be aware of - I wasn't until I recently discovered it in the documentation by accident : Try Catch ex As Exception When [Expression] End Try I recently needed this for a generic function which I was calling both synchronously and asynchronously (separate thread). I wanted this function to handle the exception by displaying a dialog box in case it was executed asynchronously only. So I just added a parameter to that function called 'handleException'

Διαβάστε περισσότερα »