Implement interface

  • Thread starter Thread starter Nicolas
  • Start date Start date
N

Nicolas

Hello,
I used to do it but don't remember anymore. How to implement an interface automaticaly when creating my class when I don't want to retype every single line of code for each property in the class

Interface ICustomer
Property CustomerID() As String

End Interface

Public Class Customer

Implements ICustomer

'when finish typing the above line it should automaticaly populate the property CustomerID

End Class
 
In VS 2003 the implementation appears by magic after you press enter on the Implements line.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com

Hello,
I used to do it but don't remember anymore. How to implement an interface automaticaly when creating my class when I don't want to retype every single line of code for each property in the class

Interface ICustomer
Property CustomerID() As String

End Interface

Public Class Customer

Implements ICustomer

'when finish typing the above line it should automaticaly populate the property CustomerID

End Class
 
You're write, on one machine I got 2002 and the other one is 2003, so it might be my surprise
In VS 2003 the implementation appears by magic after you press enter on the Implements line.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com

Hello,
I used to do it but don't remember anymore. How to implement an interface automaticaly when creating my class when I don't want to retype every single line of code for each property in the class

Interface ICustomer
Property CustomerID() As String

End Interface

Public Class Customer

Implements ICustomer

'when finish typing the above line it should automaticaly populate the property CustomerID

End Class
 
Thank you it did the magic trick, I was on the wrong machine with the older version
In VS 2003 the implementation appears by magic after you press enter on the Implements line.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com

Hello,
I used to do it but don't remember anymore. How to implement an interface automaticaly when creating my class when I don't want to retype every single line of code for each property in the class

Interface ICustomer
Property CustomerID() As String

End Interface

Public Class Customer

Implements ICustomer

'when finish typing the above line it should automaticaly populate the property CustomerID

End Class
 
Nicolas,

you probably turned the option off which is resposible for automatically
inserting the lines you want.
Try Tools, Options, Text Editor, Basic, Vb specific, and check, if the
corresponding checkboxes are really checked
(I'm working with the German VS, so maybe some labels are not correct).

Klaus

Hello,
I used to do it but don't remember anymore. How to implement an interface
automaticaly when creating my class when I don't want to retype every single
line of code for each property in the class

Interface ICustomer
Property CustomerID() As String
End Interface
Public Class Customer
Implements ICustomer
'when finish typing the above line it should automaticaly populate the
property CustomerID
End Class
 
Back
Top