Can a Symbol = null ?

Created at 15 Mar 2019, 03:46
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
A.

a.fernandez.martinez

Joined 02.03.2019

Can a Symbol = null ?
15 Mar 2019, 03:46


Can a Symbol = null, without having any errors ?

For example :

Symbol symbol = null;

 

I want to create a method that can take a symbol as an optional argument so I want to initialize it to null, is it possible ?

Thanks.

 

 


@a.fernandez.martinez
Replies

PanagiotisCharalampous
15 Mar 2019, 10:47

Ηi a.fernandez.martinez,

It is possible but you need to program your function properly to avoid NullReference exceptions.

Best Regards,

Panagiotis


@PanagiotisCharalampous