|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
C# Compilation Errors please help
I'm getting compilation error "The variable 'dest' is declared but never used" on following code segment
foreach( Destination dest in this.destinationList) { //Do something } the comiler seems to be know the Destination class and destinationList. Any Idea what would cause this error. I've another compilation error in a differnt scenerio. In my C# file ABC.cs I have two classes (let say classA and ClassB) written under the same namespace N. From my another C# file XYZ.cs I call the "using N" directive to make use of the methods in the ClassA and classB. However, I have no problem accessing the methods of classA but for classB I get "The type or namespace name 'ClassB' could not be found (are you missing a using directive or an assembly reference?) " Here's how I'm calling it in XYZ.cs using N; classB B = new classB(); Just to provide more detail, I had the classA written previously and then I added classB to the same namespace. Are there any restrictions around that? or my Visual Studio.NET is creating this problem? I'm not sure I'm lost. Please help. |
|
#2
|
|||
|
|||
|
Re: C# Compilation Errors please help
Quote:
It seems that the destinationList is empty, since dest is not used. could you test the number of items in your destinationList first before you loop?
__________________
- Rogier Doekes |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > C# Compilation Errors please help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|