mercredi 19 novembre 2014

Disposing resources within a module in vb.net application


Vote count:

0




I have a vb.net application , in which I need to implement the Idisposable interface in my module



Public Module InteropHelper
<Extension()> _
Public Function SetActiveSheet(ByVal xlWorkBook As Workbook, ByVal strClasseurName As String) As Worksheet
Dim ws As Worksheet = CType(xlWorkBook.Worksheets.Item(strClasseurName), Worksheet)
ws.Visible = XlSheetVisibility.xlSheetVisible
ws.Activate()
Return ws
End Function
End Module


I need to dispose some resources in my helper class , but the implementation of the Idisposable interface isn't permitted . So



  1. Why I can't implement it?

  2. What is the best idea to resolve this issue?



asked 1 min ago







Disposing resources within a module in vb.net application

Aucun commentaire:

Enregistrer un commentaire