Click here to Skip to main content
15,889,874 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Actually i have develop winform app for browse files at the time i want file propeties

like filename,path of file,size,extension,content of file my code like as:

C#
private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.CheckFileExists = true;
            openFileDialog.AddExtension = true;
            openFileDialog.Multiselect = true;
            openFileDialog.Filter = "*.pdf";
            DialogResult result = openFileDialog.ShowDialog();
            if (result == DialogResult.OK)
            {
                string[] files = openFileDialog.FileNames;
            }
           
            
        }


pls help me for accessing file properties whenever browse the files

and one thing is if u not possible to access the file properties in this way. then

convert string array to fileinfo array. fileinfo array useful for access file

properties thats why i am asking.pls help me.
Posted

1 solution

Use File Class Check it OUT
you can do what ever you want with file and easily access File Attributes

https://msdn.microsoft.com/en-us/library/system.io.file%28v=vs.110%29.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900