Hello Forum,
I want to implement this code in single assign activity.
Link = Link .Substring(Link .IndexOf(‘:’) - 1);
Link = System.IO.Path.GetPathRoot(Link );
DriveInfo drive = new DriveInfo(Link );
return drive.DriveType == DriveType.Network ? true : false;
How to do that? If not all atleast 1st few lines in single assign by using IF - THEN? Possible?
Anil_G
(Anil Gorthi)
2
@shubhamkumar.tiwari
Try this…you can assign to a boolean variable
bool_Variable = If(new DriveInfo(System.IO.Path.GetPathRoot(Link.Substring(Link.IndexOf(':') - 1))).DriveType==DriveType.Network,True,False)
Getting error as “Expression expected”.
Yoichi
(Yoichi)
4
Hi,
Which language do you use in UiPath? How about the following?
VB
boolVar = new DriveInfo(System.IO.Path.GetPathRoot(Link.Substring(Link.IndexOf(":") - 1))).DriveType=DriveType.Network
C#
boolVar = new DriveInfo(System.IO.Path.GetPathRoot(Link.Substring(Link.IndexOf(':') - 1))).DriveType==DriveType.Network
Regards,
1 Like
Anil_G
(Anil Gorthi)
5
@shubhamkumar.tiwari
Can you show some screenshot please
Cheers