STream class 的哪些子class 支持在 C# 中查找(不在文档 ffs 中)

Which subclasses of the STream class support seeking in C# (not in the docs ffs)

一般来说,我只想知道C#中哪些流支持查找。查了文档,微软的大神们解释了概念,但实际上并没有说可以求哪些。

the docs所述:

Streams can support seeking. Seeking refers to querying and modifying the current position within a stream. Seek capability depends on the kind of backing store a stream has. For example, network streams have no unified concept of a current position, and therefore typically do not support seeking.

能搜的不能一一列举,要看流量背后有什么后盾。

如果您想知道流是否可以搜索,请检查 CanSeek-Property. If it's true, you can use the seeking properties and methods available. Again, see the docs (remarks section)

If a class derived from Stream does not support seeking, calls to Length, SetLength, Position, and Seek throw a NotSupportedException.