Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Anyone managed to use the List<T> class in NT?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone managed to use the List<T> class in NT?

    Hello,

    I am trying to concatenate a series of strings to create a single string for use with the Print() method to write a series of datapoints to the Output window on a single line. The List<T> class seems ideal for my needs as it includes a separator option.

    Has anyone succeeded in using this class to concatenate with a separator in NT? See here:

    http://msdn.microsoft.com/en-us/libr...(v=vs.90).aspx

    NT does not seem to recognise the List class however, and I'm not sure why...

    Any suggestions welcome!

    Update: just to clarify, the List class creates a string array that can subsequently be concatenated easily using the string.Join() method.
    Last edited by ours_solaire; 04-13-2014, 08:15 AM. Reason: Add information

    #2
    Originally posted by ours_solaire View Post
    Hello,


    NT does not seem to recognise the List class however, and I'm not sure why...

    Any suggestions welcome!

    Update: just to clarify, the List class creates a string array that can subsequently be concatenated easily using the string.Join() method.

    Without seeing your code and includes - Did you include System.Collections.Generic ?

    Comment


      #3
      Hey Sledge,

      Thanks for your input. I just realised after posting that string.Join can be used with a normal string array, so I will just do that.

      Comment


        #4
        Originally posted by ours_solaire View Post
        Hey Sledge,

        Thanks for your input. I just realised after posting that string.Join can be used with a normal string array, so I will just do that.
        Even better, if what you describe is all that you want to do, using a String.Format() gives you even better control.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        388 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        257 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        215 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        300 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        267 views
        0 likes
        Last Post CarlTrading  
        Working...
        X