473,394 Members | 1,724 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,394 software developers and data experts.

Interface creation in VB.Net 2005

Is it me or has the way interfaces created changed in VB 2005?
I have to create a class file and then create the Interface within that, e.g.:
to create an Interface called IOrders, I create a class file called
Interfaces then within that file:
Public Class Interfaces
Interface IOrders
Property myOrderID() As Integer
End Interface
End Class

To reference this Interface in an Implements statement I have to use
Interfaces.IOrders. If I don't 'wrap' the interface in a class it can't be
seen by any Implements statement.
Am I don't something embarassingly wrong here, or have things changed with
2005?

Feb 15 '06 #1
2 1242
"John Mason" <Jo*******@discussions.microsoft.com> schrieb:
Is it me or has the way interfaces created changed in VB 2005?
I have to create a class file and then create the Interface within that,
e.g.:
to create an Interface called IOrders, I create a class file called
Interfaces then within that file:
Public Class Interfaces
Interface IOrders
Property myOrderID() As Integer
End Interface
End Class

To reference this Interface in an Implements statement I have to use
Interfaces.IOrders. If I don't 'wrap' the interface in a class it can't be
seen by any Implements statement.


Mhm... It should work without adding the interface to the class as a nested
type. I am curious if it only doesn't show up in IntelliSense or if the
compiler complains about the 'Implements...'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 15 '06 #2
Many thanks for your reply Herfried, I think I have now resolved the problem.
Initially, when creating the class file which I wanted to use for my
Interface file I chose NOT to store the file in the App_Code folder. In that
resulting file, the Interface name would not show up in Intellisense.
Now, by allowing the file to be created in the App_Code folder, the
Interface IS available in Intellisense.
I'm afraid I'm a victim of trying to learn VB.Net 2005 at home, without the
crutch of my far more intelligent colleagues and the Help system showing me
everything except what I need to know!

"Herfried K. Wagner [MVP]" wrote:
"John Mason" <Jo*******@discussions.microsoft.com> schrieb:
Is it me or has the way interfaces created changed in VB 2005?
I have to create a class file and then create the Interface within that,
e.g.:
to create an Interface called IOrders, I create a class file called
Interfaces then within that file:
Public Class Interfaces
Interface IOrders
Property myOrderID() As Integer
End Interface
End Class

To reference this Interface in an Implements statement I have to use
Interfaces.IOrders. If I don't 'wrap' the interface in a class it can't be
seen by any Implements statement.


Mhm... It should work without adding the interface to the class as a nested
type. I am curious if it only doesn't show up in IntelliSense or if the
compiler complains about the 'Implements...'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 16 '06 #3

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

Similar topics

2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
1
by: SStory | last post by:
I am doing the following with my MDI app.. Please advise if I am going about this wrong or there is a better way. I thought, well, the main form needs to be able to ask the child form if it...
3
by: Brian Mitchell | last post by:
What's the secret to getting the text editor to automatically create the interface members when you use an implements? I am implementing an interface in my class, which has about 20 functions, 2...
7
by: Iain Mcleod | last post by:
Hi This must be an often encountered problem. I want to declare an abstract class or an interface with nothing but several static constants so that I can use polymorphism when I call each of them...
3
by: Nick Dreyer | last post by:
I was quite surprised to notice that Sub New() gets called twice, once at declaration time and once at creation time. I can't figure out why it would be called at declaration if there is no class...
15
by: Xah Lee | last post by:
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs....
1
by: wojtek | last post by:
Hi all! I am wondering if it the right place to post this kinda question but I am looking for a tutorial/sdk/manual/whatever to write a c/C#/whatever application for a pppoe interface creation in...
8
by: Lamefif | last post by:
// C3DRect supports IDraw and IShapeEdit. class C3DRect : public IDraw, public IShapeEdit { public: C3DRect(); virtual ~C3DRect(); // IDraw virtual void Draw(); // IShapeEdit virtual void...
1
by: =?Utf-8?B?VW1lc2huYXRo?= | last post by:
My query is why I need an Interface, since my abstract class does the same functionality Interface No implementation of methods - ------- This can achieved by abstract class No instance...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.