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

Enum Delcarations

I have a public enums declared as below in a project named "mfirstSolution"

Imports ......
Imports .....

Public Enum myEnum1
FirstEntry
SecondEntry
End Enum

Public Class myClass
Private v_EnumValue as myEnum1
Public Property myProperty () as myEnum1
Get
Return v_EnumValue
End Get
Set (ByVal Value as myEnum1
v_EnumValue = Value
End Set
End Class

This works in a standalone solution but when I have another project and add
this project to the that solution, I get a build error stating that "myEnum1"
is Ambiguous in NameSpace "myfirstsolution". Any help would be appreciated.
--
Dennis in Houston
Nov 21 '05 #1
1 1063
Did you create the enum in both projects? If so, then you most likely need
to create a design that doesn't require you define the enum in both
projects, and is not necessary and, as you seen doesn't really work that
well anyway.

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
I have a public enums declared as below in a project named "mfirstSolution"
Imports ......
Imports .....

Public Enum myEnum1
FirstEntry
SecondEntry
End Enum

Public Class myClass
Private v_EnumValue as myEnum1
Public Property myProperty () as myEnum1
Get
Return v_EnumValue
End Get
Set (ByVal Value as myEnum1
v_EnumValue = Value
End Set
End Class

This works in a standalone solution but when I have another project and add this project to the that solution, I get a build error stating that "myEnum1" is Ambiguous in NameSpace "myfirstsolution". Any help would be appreciated. --
Dennis in Houston

Nov 21 '05 #2

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

Similar topics

20
by: Glenn Venzke | last post by:
I'm writing a class with a method that will accept 1 of 3 items listed in an enum. Is it possible to pass the item name without the enum name in your calling statement? EXAMPLE: public enum...
21
by: Andreas Huber | last post by:
Hi there Spending half an hour searching through the archive I haven't found a rationale for the following behavior. using System; // note the missing Flags attribute enum Color {
31
by: Michael C | last post by:
If a class inherits from another class, say Form inherits from control, then I can assign the Form to a variable of type Control without needing an explicit conversion, eg Form1 f = new Form1();...
18
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I have created an enum list like this: enum myEnum : int { This = 2, That, NewVal = 10, LastItm
1
by: Dennis | last post by:
I have a public enums declared as below in a project named "mfirstSolution" Imports ...... Imports ..... Public Enum myEnum1 FirstEntry SecondEntry End Enum
13
by: Don | last post by:
How do I get an Enum's type using only the Enum name? e.g. Dim enumType as System.Type Dim enumName as String = "MyEnum" enumType = ???(enumName)
1
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
2
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.