To read a pdf file from filepath
Hi,I am developing a windows forms application. I need to open the pdf file that is present in the shared folder while clicking a button. I have used the below code but not able to open it, provide suggestion to open
if (File.Exists(filepath))
{
using (FileStream fs = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.None))
{
byte[] b = new byte[1024];
UTF8Encoding temp = new UTF8Encoding(true);
while (fs.Read(b, 0, b.Length) > 0)
{
Console.WriteLine(temp.GetString(b));
}
}
}

