473,513 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Enumerators

Is it possible to create dynamic enumerators in Visual
Basic .Net? For example, an enumurator that provides a
dropdown of available SQL servers?
Jul 21 '05 #1
2 1779
An enumerator is a list of values that are part of a type
and that are called programmatically. A list of available
sql servers are just text values in a combo box.

So, knowing that I'm not quite sure what you're asking.
In terms of actually creating an enumerator on the fly,
you wouldn't want to because it serves no purpose.

To give you an idea, here is the typically scenario for
an enumerator:

public enum eCars
GM = 0
Ford = 1
end enum

public sub Test(e as eCars)
select case e
case eCars.GM
...
case eCars.Ford
...
end select
end sub

So, you can see that using a dynamic enumerator is not
really practical.

Jeff Levinson

Author of "Building Client/Server Applications with
VB.NET: An Example Driven Approach"
-----Original Message-----
Is it possible to create dynamic enumerators in Visual
Basic .Net? For example, an enumurator that provides a
dropdown of available SQL servers?
.

Jul 21 '05 #2

But what I'm wanting to do is have the sql servers drop
down in design mode like an enumeration. EX:

objTest.GetData(<Enumerated Servers>,<Enumerated
DataBases>)
-----Original Message-----
An enumerator is a list of values that are part of a type
and that are called programmatically. A list of available
sql servers are just text values in a combo box.

So, knowing that I'm not quite sure what you're asking.
In terms of actually creating an enumerator on the fly,
you wouldn't want to because it serves no purpose.

To give you an idea, here is the typically scenario for
an enumerator:

public enum eCars
GM = 0
Ford = 1
end enum

public sub Test(e as eCars)
select case e
case eCars.GM
...
case eCars.Ford
...
end select
end sub

So, you can see that using a dynamic enumerator is not
really practical.

Jeff Levinson

Author of "Building Client/Server Applications with
VB.NET: An Example Driven Approach"
-----Original Message-----
Is it possible to create dynamic enumerators in Visual
Basic .Net? For example, an enumurator that provides a
dropdown of available SQL servers?
.

.

Jul 21 '05 #3

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

Similar topics

6
1801
by: Matt Taylor | last post by:
I'm trying to write an x86 assembler in C++ for use in a debugger. What I'd like do is to use template specialization to prevent invalid combinations from compiling. Thus one could not accidentally...
1
1857
by: Dave | last post by:
I have several enums that are generated by a code generator (and I have no control over the code generator), the problem is that the names are pretty long enum VeryLoooooooongEnumName {...
2
1360
by: Peter Rilling | last post by:
A design pattern question. As you know, an enumerator in .NET is broken into two interface (IEnumerable and IEnumerator). Is there a benefit in having two interfaces? Why not just have the...
2
1684
by: Andrew Quine | last post by:
Hi Short one: looking for a good example and an explanation of such enumerators. I know MessageEnumerator and ResourceReader do this, for example, but what is the implementation of the...
5
3436
by: juan | last post by:
hi i have an arraylist that has doctor objects with various properties, members and methods. i want to enumerate this arraylist object. but i dont understand how. this is what i have done ...
6
2013
by: Tim Davis | last post by:
I am currently writing a class which I would like to make "enumerable" by inheriting from IEnumerable. The documentation says that the IEnumerator.MoveNext method should throw an exception if the...
2
328
by: Bob Shafer | last post by:
Is it possible to create dynamic enumerators in Visual Basic .Net? For example, an enumurator that provides a dropdown of available SQL servers?
1
1486
muaddubby
by: muaddubby | last post by:
Hello all and happy new year. I've seen several posts floating around asking about string enumerators in C#, and generally speaking, they're not supported. I've come up with a way around it...
1
1291
nitindel
by: nitindel | last post by:
Hi All, May i have an in depth article of enumerators in C#..that explains the Enumerators in C# very precisely.... Thanks, Nitin
0
7384
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
7539
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...
1
7101
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
7525
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...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.