473,324 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Implement interface

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

Nov 20 '05 #1
4 2715
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

"Nicolas" <nl*****@hotmail.com> wrote in message news:Os**************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #2
You're write, on one machine I got 2002 and the other one is 2003, so it might be my surprise
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message news:OP**************@TK2MSFTNGP09.phx.gbl...
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

"Nicolas" <nl*****@hotmail.com> wrote in message news:Os**************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #3
Thank you it did the magic trick, I was on the wrong machine with the older version
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message news:OP**************@TK2MSFTNGP09.phx.gbl...
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

"Nicolas" <nl*****@hotmail.com> wrote in message news:Os**************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #4
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

"Nicolas" <nl*****@hotmail.com> schrieb im Newsbeitrag
news:Os**************@TK2MSFTNGP10.phx.gbl...
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
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter | last post by:
I want to copy a parent class instance's all datas to a child's. It's actually a C++'s copy constructor. But why the following code does not work - there is a compile error! How it should look...
2
by: Derrick | last post by:
Is there an implement interface wizard is C#/Visual Studio? And, I have an interface, with many implentations, want to provide a Web Service implementation. What would be the standard practice? ...
3
by: Brett Hall | last post by:
I have a VB.NET interface that my managed C++ code is to implement. I seem to be stuck implementing an event defined in that interface. Does anyone have a simple code snippet that will show me...
2
by: Dave | last post by:
I'm trying to extend the System.IAsynchResult so I created a class as follows: public class MyAsynchResult : System.IAsyncResult { ..... } But get: ...
14
by: Jim | last post by:
I am using VB.Net 2.0 and I am completely new to the concept of implementing interfaces. Can anyone explain "implementing interfaces" to me and perhaps give me an example of implementing an...
7
by: moondaddy | last post by:
If I'm in a class that inherits an interface, is there a shortcut key that will write the implementation of the interface into the class? I remember seeing something like this in vb.net. ...
52
by: Ben Voigt [C++ MVP] | last post by:
I get C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member...
4
by: =?Utf-8?B?QmFqaS4=?= | last post by:
Hi, Can somebody suggest me, how can I implement a vc++ interface in C#.net. This interface has method CallMe( ) which is used as a CallBack from my main application. Thanks, Baji.
5
by: Tony Johansson | last post by:
Hello! Assume you have the following interface and classes shown below. It is said that a class must implement all the methods in the interface it inherits. Below we have class MyDerivedClass...
3
by: =?Utf-8?B?Sm9uIEU=?= | last post by:
I have an interface class with maybe eight functions, defined in one workspace and am defining a class in a second workspace that derives from this interface. Unfortunately only 7 of the 8...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.