【问题标题】:c# be able to using the stream, even after change the variable that holding itc# 能够使用流,即使在更改了保存它的变量之后
【发布时间】:2020-10-19 10:25:29
【问题描述】:

是否有任何方法可以使流保持活跃和可用,即使在更改变量之后也是如此?

伪代码:

func send > send
func StreamHandler > handle > close
        
    while (true)
        stream = null
        loop 5:
            stream = new stream
            send(stream)
        StreamHandler(stream);

【问题讨论】:

    标签: c# algorithm variables stream


    【解决方案1】:

    我认为你不能在覆盖变量后使用流,但你可以使用流的集合来存储它们。

    C# List of Streams dispose/close 回答者:mkedobbs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-23
      • 2018-08-27
      • 1970-01-01
      • 2011-03-14
      相关资源
      最近更新 更多