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 is globalization and localization in asp net?

0 Answers  


Explain the difference between panel and groupbox classes using .net?

0 Answers  


I have got less marks in bsc it So how to get interview.tell me

1 Answers  


Why do we need asp.net?

0 Answers  


Differentiate an ADO.NET Dataset and an ADO Recordset with its functionality?

3 Answers   Siebel,






Which protocol is used to call a web service?

0 Answers  


What is application Object?

0 Answers   Infogain,


Can a master page have more than one contentplaceholder?

0 Answers  


How Session use Cookies in State Management?

0 Answers  


How do sessions work?

0 Answers  


Which control has default post back is enabled(true)?

0 Answers   Sans Pareil IT Services,


What is enableviewstate in asp net?

0 Answers  


Categories