Feb 3rd, 2010, 11:36 PM
Can anyone tell me the reason why I can access
System.Windows.Forms.DataVisualization.Charting.Utilities within C#, but not VB?
Feb 3rd, 2010, 11:45 PM
Have you added the appropriate reference to your VB project? C# and Vb code can access EXACTLY the same types. They can each access any type declared in any assembly that you reference. I would assume that that refernce would normally be added for you when you add a chart control to your form.
Feb 4th, 2010, 12:17 AM
I was aware of them being able to access the same types, which is why I am confused.
If I start a new Windows App Form in C# and VB and add the
System.Windows.Forms.DataVisualization.Charting.Utilities reference, to both, I can see the Utilities, 3DBorder etc Namespaces in C#, but in VB, I have nothing.
Perhaps I have missed something fundamental out. Will go back and try again.
Feb 4th, 2010, 06:24 AM
That namespace may not be listed on the References page but that doesn't mean that you can't access it. You can add your own imports on the References page or you can import at the file level. If you do that you'll be presented with an error message telling you that the namespace has no public members, which is why you aren't shown it in the first place. If you type out that namespace in C# code and then add a dot you'll get no help from Intellisense for the very same reason: there are no members to access.
This all begs the question: why are you trying to make use of the namespace when it doesn't contain anything you can use?
Click Here to Expand Forum to Full Width