码迷,mamicode.com
首页 > Windows程序 > 详细

c#视频位置

时间:2015-11-03 11:51:13      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

static void Main(string[] args)
        {

            string scoure = @"C:\Documents and Settings\Administrator\桌面\数据库函数.avi";
            string target="D:\\1.avi";
            move(scoure, target);
            Console.ReadKey();
        }
        public static void move(string scoure, string target)
        {
            using(FileStream red=new FileStream(scoure,FileMode.OpenOrCreate,FileAccess.Read))
            {
                using (FileStream wir = new FileStream(target, FileMode.OpenOrCreate, FileAccess.Write))
                {
                    byte[] b = new byte[1024 * 1024 * 5];
                    while (true)
                    {
                        int r = red.Read(b, 0, b.Length);
                        if (r == 0) break;
                        wir.Write(b,0,r);
                    }
               
                }

            }
        }

c#视频位置

标签:

原文地址:http://www.cnblogs.com/mengluo/p/4932427.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!