Locking part or last byte of a binary file

John 466 Reputation points
2021-06-17T11:33:52.97+00:00

I may have become familiar with the FileStream library type.

How does the Lock method work?

Can anyone provide me some examples?

Which parameters and their data types do I need to make this work properly?

Regards,

John

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,835 questions
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 35,401 Reputation points
    2021-06-17T12:05:15.57+00:00

    To lock part of a file use FileStream.Lock method which has two parameters, start of range and length of range to lock then to unlock use Unlock. Both methods have code samples to learn from.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.