|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#11
|
||||
|
||||
|
Re: Visual Basic
Quote:
However, after reading your post i decided to try that in C#, and as far as I can tell C# dosn't support that either. This code: Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int i = 10;
switch (i) {
case (1):
Debug.Print("1");
case (2):
Debug.Print("2");
}
}
}
}
Error 1 Control cannot fall through from one case label ('case 1:') to another C:\Users\Eric Haskins\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplicati on1\Program.cs 15 17 ConsoleApplication1 Error 2 Control cannot fall through from one case label ('case 2:') to another C:\Users\Eric Haskins\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplicati on1\Program.cs 17 17 ConsoleApplication1 Am I being stupid again, or is this a limitation of all .net languages? EDIT: I found my own answer. http://msdn2.microsoft.com/en-us/lib...28(VS.90).aspx That seems slightly old VBish. EDIT: More info http://blogs.msdn.com/abhinaba/archi...15/492866.aspx -Eric Last edited by EHaskins : 13-11-2007 at 23:18. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Visual Basic help needed. | Cody Carey | Programming | 1 | 25-02-2007 15:06 |
| Visual Basic Scouting Problem | Jeffel | Programming | 7 | 11-02-2005 19:30 |
| Visual Basic | dddriveman | Programming | 12 | 20-03-2004 13:03 |
| Visual Basic 6 Dashboard | LBK Rules | Programming | 1 | 22-01-2003 13:06 |