How to read .ptd extension file in C#

One07k-4914 101 Reputation points
2021-02-05T05:34:29.803+00:00

Hi ,

I have requirement to read the *.ptd extension file.Is there any library available to do this?

Thanks in advance

Developer technologies C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,651 Reputation points
    2021-02-05T07:53:35.767+00:00

    Hi la07k-4914,
    I suggest you can use FileStream to read .ptd file to byte array, and then write the byte array back to a .txt file.

    FileStream stream = File.OpenRead(@"C:\Users\Desktop\test.ptd");  
    byte[] fileBytes = new byte[stream.Length];         
    stream.Read(fileBytes, 0, fileBytes.Length);  
    using (Stream file = File.OpenWrite(@"C:\Users\Desktop\test.txt"))  
    {  
        file.Write(fileBytes, 0, fileBytes.Length);  
    }  
    stream.Close();  
    

    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.