We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 578d5a6 commit 82d09cfCopy full SHA for 82d09cf
sources/OpenMcdf/StreamView.cs
@@ -63,18 +63,8 @@ public override void Flush()
63
64
public override long Position
65
{
66
- get
67
- {
68
- return position;
69
- }
70
-
71
- set
72
73
- if (position > length - 1)
74
- throw new ArgumentOutOfRangeException(nameof(value));
75
76
- position = value;
77
+ get => position;
+ set => Seek(value, SeekOrigin.Begin);
78
}
79
80
public override int Read(byte[] buffer, int offset, int count)
@@ -184,7 +174,7 @@ public override long Seek(long offset, SeekOrigin origin)
184
174
break;
185
175
186
176
187
- if (length <= position) // Don't adjust the length when position is inside the bounds of 0 and the current length.
177
+ if (position > length)
188
178
AdjustLength(position);
189
179
190
180
return position;
0 commit comments