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

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 1758
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
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
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
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
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
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
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
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
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
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
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.