can we pass coditions in swtich case?

Answers were Sorted based on User's Feedback



can we pass coditions in swtich case?..

Answer / jagadishkumar.reddy

using switch statement we cant pass any Condition.
switch (expression)
{
case constant-expression:
statement
jump-statement
[default:
statement
jump-statement]
}
expression can be intergral or string.

Is This Answer Correct ?    2 Yes 0 No

can we pass coditions in swtich case?..

Answer / nikitha

No we cannot pass condition in switch

ex:
int a, b;
string str1;
switch(a+b)
Do some thing like this u will get compile error...

Is This Answer Correct ?    1 Yes 0 No

can we pass coditions in swtich case?..

Answer / lavanya

Yes, we can pass conditions to switch statement.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What base class do all Web Forms inherit from?

8 Answers  


Whats the use of @ Register directives ?

4 Answers  


How many classes can a single .NET DLL contain?

2 Answers  


What is different in .net 1.1 and .net 2.0?

0 Answers  


How can u handle Exceptions in Asp.Net?

4 Answers  






Can one dll file contains the compiled code of more than one .net language?

0 Answers  


What is master page in dtp?

0 Answers  


Differentiate globalization and localization.

0 Answers  


What permissions do asp.net applications posses by default?

0 Answers  


Can we use multiple forms in single asp.net application?

3 Answers   Polaris,


What is the difference between managed and unmanaged code? *******

2 Answers   Patni,


How can you debug an ASP page, without touching the code?

1 Answers   Prodigy Technologies,


Categories