Home Forums WinForms controls Xceed Chart for WinForms Series instantiation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18765 |

    hi,
    in sample i saw, series creation is made through chart object

    ex : LineSeries ls = (LineSeries)Chart.Series.Add(SeriesType.Line);

    i want to know what are the consequences to instantiate series object directly. everything seems to work but class sumary is : “This member is reserved for internal use and is not intended to be used directly from your code”

    ex : LineSeries ls = new LineSeries();

    I made few tests and the results seems to be the same regardless the way i use.

    Why do i need chart object to create series object ?

    thanks

    Imported from legacy forums. Posted by Andre (had 2146 views)

    User (Old forums)
    Member
    Post count: 23064

    It is best to use the Add method to ensure that your code stays compatible with any new release of the Chart, since internal signatures can change, whereas the public interface will not (for backward compatibility reasons).

    Imported from legacy forums. Posted by André (had 3084 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.