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 sjsj2732, Yesterday, 04:31 AM
        0 responses
        26 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        283 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        280 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        131 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        90 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X