ToString() public static method

stream 내용을 읽어 문자열로 반환합니다.
public static ToString ( Stream stream ) : string
stream Stream 읽을 스트림
return string
コード例 #1
0
 public void ToStream_ToString_With_Encoding()
 {
     using (var ms = S3.ToStream(Encoding.UTF8)) {
         string str2 = StringTool.ToString(ms, Encoding.UTF8);
         Assert.AreEqual(S3, str2);
     }
 }
コード例 #2
0
        public void Base64StringTest()
        {
            string enc = S3.ToBytes().Base64Encode();
            string dec = StringTool.ToString(enc.Base64Decode());

            Assert.AreEqual(S3, dec);
        }
コード例 #3
0
 public void ToStream_ToString()
 {
     Assert.AreEqual(S3, StringTool.ToString(S3.ToStream()));
     Assert.AreEqual(S3, StringTool.ToString(S3.ToStream(Encoding.UTF8), Encoding.UTF8));
 }