Currently in my program after doing datascraping I am getting a string that is shown in the following way:
"FileName.pdf
September 25, 2121
49 KB
Share"
How can I split this string to just get the name of the pdf file (the first line of the string)? Taking into account that the file name can have any amount and type of symbols and characters.
* .Split method splits your variable at every NewLine and converts all the contents (both newline and strings) to an array and StringSplitOptions.RemoveEmptyEntries removes empty values in the array.
So, in the end your array only holds these items {"FileName.pdf", "September 25, 2121", "49 KB", "Share"}