C# - Using a Class
Posted on 2005-03-22
I'm new to C#, having programmed VB6 and VB.NET for while. I have a small app with a combo box that I want to populate with the names of some cities and delivery prices to those cities. I've created a cCity class in my C# project with two properties - name, deliveryprice. What I want to do now is add instances of the cCity class to the combo box. The code I've used in VB.NET is this:
cboCities.Items.Add(New cCity("New York", 11.65))
When I try this in C# (using lower case new), cCity does not show up in intellisense as an available class, eventhough it is part of my project.
What am I doing wrong? Help...