Help me remove empty lines from string array

I am reading mail body and converting it into array of string but its also taking empty lines as shown in output. I want to remove these empty lines

Hi,

Can you try the following?

mail.body.split(System.Environment.NewLine.ToCharArray,StringSplitOptions.RemoveEmptyEntries)

Regards,

3 Likes

String.Replace(" “,”") @Gaurav07

cheers :smiley:

Happy learning :smiley:

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.