Print()
Print()
Definition
Converts object data to a string format and appends the specified value as text to the NinjaScript Output window. Printing data to the NinjaScript Output window is a useful debugging technique to verify values while developing your custom NinjaScript object.
The Print() method only targets the Output tab recently specified by set PrintTo property.
Method Return Value
This method does not return a value.
Syntax
Print(object value)
Warning: High frequency of Print() method calls can represent a performance hit on your PC. Please see the NinjaScript section of the Performance Tips article for more information.
Parameters
Tips:
- You can format prices aligned for easier debugging by using the ToString() method. E.g., Low[0].ToString(“0.00”) forces the format from 12.5 to 12.50. Low[0].ToString(“0.000”) forces 12.500.
- You can format one or more objects in a specified string with the text equivalent of a corresponding object’s value for better maintainability using the .NET string.Format() method. Please see the examples below.

