Menampilkan List File di C#

Desain Form 



Souce Code :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace File_Info
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
System.IO.DriveInfo di = new System.IO.DriveInfo(@”D:\”);
System.IO.DirectoryInfo dir = di.RootDirectory;
System.IO.FileInfo[] file = dir.GetFiles(“*.*”);
foreach(System.IO.FileInfo fileinfo in file)
{
string getlist = ” ” + fileinfo.Name + ” ” + fileinfo.LastAccessTime + ” ” + fileinfo.Length;
listBox1.Items.Add(getlist);
}
}
}
}

Tidak ada komentar:

Posting Komentar

Profile Page Screen - Flutter UI

Profile Page Berikut ini adalah contoh  source code untuk Design Profile Page menggunakan flutter,  sebelumnya jangan lupa untuk membua...