[英]Is there an interface type that is implemented by various cli streams?
I was writing some support functions for MemoryStream but i figured that since the same methods would also work for FileStream and NetworkStream, I might as well set the argument type to an interface that I assume all of these share. 我正在为MemoryStream编写一些支持功能,但我发现由于相同的方法也适用于FileStream和NetworkStream,因此最好将参数类型设置为我假定所有这些共享的接口。 I couldn't find out what that interface is called though. 我找不到那个接口叫什么。 IStream from System.Runtime.InteropServices.ComTypes appears to be something else. System.Runtime.InteropServices.ComTypes的IStream似乎是另外一回事。
它们没有实现相同的接口,但是它们都继承了抽象的System.IO.Stream类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.