c# - StreamReader and Dispose -


I have a method that takes the stream as a parameter:

  Public Null Method (stream stream) {...}   

In this method I am creating StreamReader. Should I use a streamminder using the statement? If so, the stream will be disposed off, it is wrong. What is the best practice to use stream and stream reader in this case?

No - in this case it is traditional to settle the caller.

Comments

Popular posts from this blog

android - How can I execute default sms app? -

jquery .css('text-decoration') doesn't work from parents -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -