Deepak Saini

Deepak Saini

  • NA
  • 667
  • 50.9k

how to Implicitly intilization of the var datatype in Switch

Dec 19 2015 6:59 AM
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;


}
 

Answers (2)