Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
how to Implicitly intilization of the var datatype in Switch
Deepak Saini
Dec 19 2015 6:59 AM
421
Reply
Hello,
i wont to in Implicitly intilization of the var datatype in Switch case.but i may nor print this.any body help me asap....
var k;
switch (Srt_TxtBoxValue)
{
case "Managed":
k = clientMachines.Where(x =>x.Is_Scheduled==false && x.Is_Installed==true);
break;
case "Unmanaged":
k = clientMachines.Where(x =>x.Is_Scheduled==false && x.Is_Installed==false);
break;
case "Scheduled for Uninstallation":
k = clientMachines.Where(x =>x.Is_Scheduled==true && x.Is_Installed==true);
break;
case "Scheduled for Installation":
k = clientMachines.Where(x =>x.Is_Scheduled==true && x.Is_Installed==false);
break;
default:
k = clientMachines.Where(x =>x.Host_Name.Contains(Srt_TxtBoxValue) || x.IP_Address.Contains(Srt_TxtBoxValue) || x.MAC_Address.Contains(Srt_TxtBoxValue) || x.Domain_Name.Contains(Srt_TxtBoxValue));
break;
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Object cannot be cast from DBNull to other types.
How to create custom events?