S
Shawn
OK, Please tell me if I am doing something wrong here...
This does NOT work if args.Length = 0 (It gives an
IndexOutOfRangeException on the args() array)
Public Shared Sub Main(ByVal args() As String)
Dim val As String = IIf(args.Length > 0, args(0).ToString,
"10")
Console.WriteLine("Waiting for workflow completion ({0}
seconds...).", val)
End Sub
This DOES work if args.Length = 0
Public Shared Sub Main(ByVal args() As String)
Dim val As String
If args.Length > 0 Then
val = args(0)
Else
val = "10"
End If
Console.WriteLine("Waiting for workflow completion ({0}
seconds...).", val)
End Sub
Am I wrong to assume that IIF can be used this way?
Thanks,
Shawn
This does NOT work if args.Length = 0 (It gives an
IndexOutOfRangeException on the args() array)
Public Shared Sub Main(ByVal args() As String)
Dim val As String = IIf(args.Length > 0, args(0).ToString,
"10")
Console.WriteLine("Waiting for workflow completion ({0}
seconds...).", val)
End Sub
This DOES work if args.Length = 0
Public Shared Sub Main(ByVal args() As String)
Dim val As String
If args.Length > 0 Then
val = args(0)
Else
val = "10"
End If
Console.WriteLine("Waiting for workflow completion ({0}
seconds...).", val)
End Sub
Am I wrong to assume that IIF can be used this way?
Thanks,
Shawn