troubleshooting Question

How do I show detailed info in my interfaces? Trying to mimic IDisposable look.

Avatar of rgn2121
rgn2121Flag for United States of America asked on
.NET ProgrammingVisual Basic.NET
3 Comments1 Solution219 ViewsLast Modified:
I am creating an interface for use in my application and I was curious how to make my interface show some of the detail that IDisposable(shown below) does.  When you type implements IDisposable, all the code in the code window gets added.

I would like to add a region such as:

#Region "MyInterface support"
#End Region

or even show comments like the IDisposable does.  I have tried just adding them in the interface, but there must be something else I need to do.  I am curious if anyone knows how to do this?
Private disposedValue As Boolean = False        ' To detect redundant calls
    ' IDisposable
    Protected Overridable Sub Dispose(ByVal disposing As Boolean)
        If Not Me.disposedValue Then
            If disposing Then
                ' TODO: free managed resources when explicitly called
            End If
            ' TODO: free shared unmanaged resources
        End If
        Me.disposedValue = True
    End Sub
#Region " IDisposable Support "
    ' This code added by Visual Basic to correctly implement the disposable pattern.
    Public Sub Dispose() Implements IDisposable.Dispose
        ' Do not change this code.  Put cleanup code in Dispose(ByVal disposing As Boolean) above.
    End Sub
#End Region

Open in new window

Alexandre Simões
Software Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros