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 tags do you need to add within the asp:datagrid tags to bind columns manually

2 Answers  


Where you store Connection string in "Web.Config" file in ASP.NET?

0 Answers   Sans Pareil IT Services,


What is comparevalidator?

0 Answers  


How can you pass multiple complex types in Web API?

0 Answers  


Explain the life cycle of an ASP .NET page.

2 Answers  






How to do Forms authentication in asp.net?

2 Answers  


Describe in brief .net framework and its components.

0 Answers  


What is the displayafter property in updateprogress control?

0 Answers  


How to communicate via Remote proxy with Client? a)MarshalByRef b)Marshal by Value or Any thing else?

0 Answers  


what is DLL Hell and how it is solved in .NET? please explain clearly??

0 Answers   TCS,


What is caching and types of caching ?

2 Answers   Infosys,


Name the tools or API for developing or testing web api?

0 Answers  


Categories