管理

C#调用系统默认程序打开文件(在自己的程序外部打开)

Posted on 2022-09-30 16:08  lzhdim  阅读(314)  评论(0)    收藏  举报

所有有默认打开程序的文件都可以打开,没有默认打开程序的需要选择打开程序

 
    /// <summary>
    /// 通过系统默认的程序直接打开文件
    /// </summary>
    /// <param name="fullNamePath">文件的完整路径</param>
    public void OpenFile(string fullNamePath)
    {
        System.Diagnostics.Process.Start(fullNamePath);
    }

 

Copyright © 2000-2022 Lzhdim Technology Software All Rights Reserved