String operation

variable1 is an array of string.

String.Join(vbcr, variable1)
String.Join(vblf, variable1)
String.Join(vbcrlf, variable1)

All of the above commands are giving me same output. Can anyone please tell me the difference??

Hi @blacksundar

Are you trying to add array of string to a single string. if yes please a sample input data and output.

Regards,
Vijay Kumar C.

You need to state the separator that is used in your array, typically “,”

At present your code is saying the string variables in your array are separated by a variable called vbcr in the first one

String.Join(vbcr, variable1)

Review the syntax for the method you are using:

I want the difference of those three separators

@blacksundar

  • vbCr : - return to line beginning
    Represents a carriage-return character for print and display functions.
  • vbCrLf : - similar to pressing Enter
    Represents a carriage-return character combined with a linefeed character for print and display functions.
  • vbLf : - go to next line
    Represents a linefeed character for print and display functions.
5 Likes