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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X