Autocompletion with Interfaces

CowZ

Member
Joined
Feb 11, 2005
Messages
18
Programming Experience
3-5
Hi,

I'm coding on some interfaces right now and discovered one very nice feature. If I type
VB.NET:
Implements IMyOwnInterface
VisualStudio makes the whole code with me, eg:
VB.NET:
Public Sub Foo() Implements IMyOwnInterface.Foo()

Ok, that's nothing really special, but as i type
VB.NET:
Implements IDisposable
Much more appears, there are private fields, comments and so on:
VB.NET:
    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 unmanaged 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.
        Dispose(True)
        GC.SuppressFinalize(Me)
    End Sub
#End Region

I want to have such stuff in my interfaces too, but I'm wondering how to do it, does anyone know?

Cu, CowZ
 
mhh k...

So there is no way to do this with my own interfaces?

Thx for the answer, CowZ
 
Back
Top