|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
"ambiguous" problem with VB.NET 2005property C.Enum1, e.g. namespace N { public enum ENUM1{}; public class C { public ENUM1 Enum1 { get{} set{} } } } When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get the following error 'ENUM1' is ambiguous because multiple kinds of members with this name exist in class 'N.C' With VB.NET 2003 all works fine. -- Denis Samoilov Project Manager for PixTools team(ISIS Scanning and Image Manipulation) Hello, Denis:
Have you tried to unambiguate from the Global namespace?: dim x as global.your_application's_namespace.n.c.enum1 Regards. Show quoteHide quote "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> escribió en el mensaje news:CD649718-98CE-4400-8EF5-EB28143F89CF@microsoft.com... | We have a namespace N which includes enumeration ENUM1 and a class C with | property C.Enum1, e.g. | namespace N | { | public enum ENUM1{}; | public class C { | public ENUM1 Enum1 | { | get{} | set{} | } | } | } | | When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get the | following error | 'ENUM1' is ambiguous because multiple kinds of members with this name exist | in class 'N.C' | | With VB.NET 2003 all works fine. | -- | Denis Samoilov | Project Manager for PixTools team(ISIS Scanning and Image Manipulation) Thank you but this did not help
-- Show quoteHide quoteDenis Samoilov Project Manager for PixTools team(ISIS Scanning and Image Manipulation) "José Manuel Agüero" wrote: > Hello, Denis: > > Have you tried to unambiguate from the Global namespace?: > dim x as global.your_application's_namespace.n.c.enum1 > > Regards. > > > "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> escribió en el mensaje news:CD649718-98CE-4400-8EF5-EB28143F89CF@microsoft.com... > | We have a namespace N which includes enumeration ENUM1 and a class C with > | property C.Enum1, e.g. > | namespace N > | { > | public enum ENUM1{}; > | public class C { > | public ENUM1 Enum1 > | { > | get{} > | set{} > | } > | } > | } > | > | When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get the > | following error > | 'ENUM1' is ambiguous because multiple kinds of members with this name exist > | in class 'N.C' > | > | With VB.NET 2003 all works fine. > | -- > | Denis Samoilov > | Project Manager for PixTools team(ISIS Scanning and Image Manipulation) > Hello Denis,
Maybe you'll have to use reflection to access the members. Use, for example, type.invokemember to access the property: dim obj as new N.C 'You may need to set the adecuate BindingFlags. result = GetType(N.C).InvokeMember("Enum1", Reflection.BindingFlags.GetProperty, Nothing, obj, Nothing) See also the PropertyInfo class. Regards. Show quoteHide quote "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> escribió en el mensaje news:51AA6783-DCA8-429C-9042-8F98CEB188F7@microsoft.com... | Thank you but this did not help | -- | Denis Samoilov | Project Manager for PixTools team(ISIS Scanning and Image Manipulation) | | | "José Manuel Agüero" wrote: | | > Hello, Denis: | > | > Have you tried to unambiguate from the Global namespace?: | > dim x as global.your_application's_namespace.n.c.enum1 | > | > Regards. | > | > | > "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> escribió en el mensaje news:CD649718-98CE-4400-8EF5-EB28143F89CF@microsoft.com... | > | We have a namespace N which includes enumeration ENUM1 and a class C with | > | property C.Enum1, e.g. | > | namespace N | > | { | > | public enum ENUM1{}; | > | public class C { | > | public ENUM1 Enum1 | > | { | > | get{} | > | set{} | > | } | > | } | > | } | > | | > | When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get the | > | following error | > | 'ENUM1' is ambiguous because multiple kinds of members with this name exist | > | in class 'N.C' | > | | > | With VB.NET 2003 all works fine. | > | -- | > | Denis Samoilov | > | Project Manager for PixTools team(ISIS Scanning and Image Manipulation) VB 2005 is case insensitve. In otherwords, ENUM1 and Enum1 are the same
identifer in VB 2005. This was also the case in VB 6 and earlier and I suspect, but don't know for sure that it was true in VB 7.x (2002 & 2003) as well. Mike Ober. Show quoteHide quote "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> wrote in message news:CD649718-98CE-4400-8EF5-EB28143F89CF@microsoft.com... > We have a namespace N which includes enumeration ENUM1 and a class C with > property C.Enum1, e.g. > namespace N > { > public enum ENUM1{}; > public class C { > public ENUM1 Enum1 > { > get{} > set{} > } > } > } > > When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get the > following error > 'ENUM1' is ambiguous because multiple kinds of members with this name exist > in class 'N.C' > > With VB.NET 2003 all works fine. > -- > Denis Samoilov > Project Manager for PixTools team(ISIS Scanning and Image Manipulation) > One other thing - are you sure your VS 2003 was in VB 2003 and not VC# 2003.
The sytax you gave below looks more like C than Basic. In C/C#, ENUM1 and Enum1 are different identifiers. Mike Ober. Show quoteHide quote "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> wrote in message news:CD649718-98CE-4400-8EF5-EB28143F89CF@microsoft.com... > We have a namespace N which includes enumeration ENUM1 and a class C with > property C.Enum1, e.g. > namespace N > { > public enum ENUM1{}; > public class C { > public ENUM1 Enum1 > { > get{} > set{} > } > } > } > > When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get the > following error > 'ENUM1' is ambiguous because multiple kinds of members with this name exist > in class 'N.C' > > With VB.NET 2003 all works fine. > -- > Denis Samoilov > Project Manager for PixTools team(ISIS Scanning and Image Manipulation) > We write SDK. So our code is on C# but our clients can use C#, VB.NET or
other .net-language. This problem does not relate to case setivity because these two different identificators: N.ENUM1 & N.C.Enum1 -- Show quoteHide quoteDenis Samoilov Project Manager for PixTools team(ISIS Scanning and Image Manipulation) "Michael D. Ober" wrote: > One other thing - are you sure your VS 2003 was in VB 2003 and not VC# 2003. > The sytax you gave below looks more like C than Basic. In C/C#, ENUM1 and > Enum1 are different identifiers. > > Mike Ober. > > "Denis Samoilov" <DenisSamoi***@discussions.microsoft.com> wrote in message > news:CD649718-98CE-4400-8EF5-EB28143F89CF@microsoft.com... > > We have a namespace N which includes enumeration ENUM1 and a class C with > > property C.Enum1, e.g. > > namespace N > > { > > public enum ENUM1{}; > > public class C { > > public ENUM1 Enum1 > > { > > get{} > > set{} > > } > > } > > } > > > > When we trying to use both N.ENUM1 and N.C.Enum1 from VB.NET 2005 we get > the > > following error > > 'ENUM1' is ambiguous because multiple kinds of members with this name > exist > > in class 'N.C' > > > > With VB.NET 2003 all works fine. > > -- > > Denis Samoilov > > Project Manager for PixTools team(ISIS Scanning and Image Manipulation) > > > > > > Denis,
It is anoying, it is not only with your classes it is even with standard Net classes as by instance Forms.Dialog I cannot help you, however maybe good to know. Cor
Adding Button Programmatically REDUX - STILL NONFUNCTIONAL
Problem with DataRelation ComboBox ReadOnly Help with first multi-thread app pls? Direct input into DataGrid? Please help! Database won't update Visual Basic .net and DirectX Stroppy Porgram Access a textbox on a report form From Windows application to ASP.Net Web Application |
|||||||||||||||||||||||