• 大小: 0.21M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-02-27
  • 语言: C#
  • 标签: d  t  

资源简介

FileStream寫入檔案、StreamReader讀取、StreamWriter讀取

代码片段和文件信息

using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace FileStreamWrite
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender EventArgs e)
        {
        rtbInput.Text = “When I was a little baby “
                            + Environment.NewLine
        + “My mother would rock me in the cradle.“;
        }
        private void btnWrite_Click(object sender EventArgs e)
        {
        string data = rtbInput.Text;
        char[] CharAry = data.ToCharArray(); // 將 string 轉為 char
        byte[] ByteAry = new byte[CharAry.Length]; // 宣告 byte[] 陣列,長度為 CharAry.Length
        for (int i = 0; i < CharAry.Length; i++)
        ByteAry[i] = (byte)CharAry[i]; // 將 c

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\App.config

     文件      10240  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\bin\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.exe

     文件        187  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\bin\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.exe.config

     文件      34304  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\bin\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.pdb

     文件      24224  2016-04-01 12:09  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\bin\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.vshost.exe

     文件        187  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\bin\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.vshost.exe.config

     文件        490  2015-10-30 15:19  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\bin\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.vshost.exe.manifest

     文件       3896  2016-03-29 15:14  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\FileStreamWrite.csproj

     文件       1889  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Form1.cs

     文件       3691  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Form1.Designer.cs

     文件       5817  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Form1.resx

     文件        865  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7379  2016-04-01 12:08  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       4632  2016-04-01 12:09  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStreamWrite.csproj.FileListAbsolute.txt

     文件        977  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStreamWrite.csproj.GenerateResource.Cache

     文件       2211  2016-03-29 15:13  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStreamWrite.csprojResolveAssemblyReference.cache

     文件        180  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStreamWrite.Form1.resources

     文件        180  2016-03-29 15:14  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStreamWrite.Properties.Resources.resources

     文件        205  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.csproj.FileListAbsolute.txt

     文件      10240  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.exe

     文件      34304  2016-03-29 15:58  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\FileStream寫入檔案、StreamReader讀取、StreamWriter讀取.pdb

     文件          0  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       4608  2016-03-29 15:15  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        530  2016-03-29 15:14  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Program.cs

     文件       1466  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Properties\AssemblyInfo.cs

     文件       2918  2016-03-29 15:14  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Properties\Resources.Designer.cs

     文件       5612  2016-03-29 15:11  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Properties\Resources.resx

     文件       1133  2016-03-29 15:14  FileStream寫入檔案、StreamReader讀取、StreamWriter讀取\FileStreamWrite\Properties\Settings.Designer.cs

............此处省略124个文件信息

评论

共有 条评论