What is the difference between File and FileInfo in C#?

后端 未结 10 1678
我在风中等你
我在风中等你 2020-12-02 11:22

I\'ve been reading that the static methods of the File Class are better used to perform small and few tasks on a file like checking to see if it exists and that

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 11:33

    A FileInfo may be needed to deal with Access Control properties. For the rest it is a Static versus Instance choice and you can pick what is convenient.

提交回复
热议问题