I have a question about some thoery.
I have a class Z. I have a function in there that calls a .net function. More specifcally i have:
VB.NET Code:
Public Sub AddEmail(ByVal mail As String) MailEntity.To.Add(New MailAddress(mail)) End Sub
now we know that creating a new instance of the mailaddress with a string parameter can throw 3 exceptions.
I want to know whter I should put a try catch block in here! OR!!
When I declare the whole class in my Application (or any other application), I should place the try catch when I call the function..
I hope I made sense.




Reply With Quote