@AzureDevOps - I am getting this error when I deploy a helper library for BizTalk code from MSI generated using BTDF via TFS 2017 CI Build ( NOT XAML). But when I deploy code directly from VS 2019 , it just works fine.
Error : System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
Code Piece
Parameter name: length
Code Piece
public static decimal get_system_charges(string param1)
{
try
{
if (Convert.ToDecimal(String.Concat(param1.Substring(20, 7), ".", param1.Substring(27, 2))) <
{
try
{
if (Convert.ToDecimal(String.Concat(param1.Substring(20, 7), ".", param1.Substring(27, 2))) <
Convert.ToDecimal(String.Concat(param1.Substring(0, 7), ".", param1.Substring(7, 2))))
return Convert.ToDecimal(String.Concat(param1.Substring(20, 7), ".", param1.Substring(27, 2)));
else
return
return Convert.ToDecimal(String.Concat(param1.Substring(20, 7), ".", param1.Substring(27, 2)));
else
return
Convert.ToDecimal(String.Concat(param1.Substring(0, 7), ".", param1.Substring(7, 2)));
}
catch (Exception ex)
{
System.Diagnostics.EventLog.WriteEntry("System", ex.ToString(), System.Diagnostics.EventLogEntryType.Error);
}
catch (Exception ex)
{
System.Diagnostics.EventLog.WriteEntry("System", ex.ToString(), System.Diagnostics.EventLogEntryType.Error);
throw new Exception(ex.ToString());
}
}
String : "000284660+000267342-000016208+"
}
}
String : "000284660+000267342-000016208+"