SetLength() 공개 메소드

When overridden in a derived class, sets the length of the current stream.
The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.
public SetLength ( long value ) : void
value long The desired length of the current stream in bytes.
리턴 void
예제 #1
0
 public void SetLengthTest()
 {
     PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
     long value = 0; // TODO: Initialize to an appropriate value
     target.SetLength(value);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
예제 #2
0
        public void SetLengthShouldThrowNotSupportedException()
        {
            var target = new PipeStream();

            try
            {
                target.SetLength(1);
                Assert.Fail();
            }
            catch (NotSupportedException)
            {
            }
        }