Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
C#: Equivalent of Select Case
Author:
Syed Irtaza Ali
E-mail:
Click to e-mail author
Website:
http://www.edreamz.net
Submitted:
2/14/2005
Version:
VB.NET 2003
Compatibility:
VB.NET 2003
Category:
Miscellaneous
Views:
111500
C#: Equivalent of Select Case You were imagining how could Microsoft forget the Select Case feature in C#. Well it didn't. But to use such a feature the syntax is a slightly different. Refer this link for detailed information: http://msdn.microsoft.com/vcsharp/team/language/ask/switch/default.aspx The syntax for the equivalent of Select Case in C# is shown below: -
Declarations:
'none
Code:
switch(num){ case 1: //dostuff break; default: //dostuff; break; }
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement