You could create a FileInfo
instance and then ask for the size using the Length
property:
foreach (string filePath in filePaths)
{
FileInfo fi = new FileInfo(filePath);
long fileSizeInBytes = fi.Length;
files.Add(new ListItem(Path.GetFileName(filePath), filePath));
}
The Length property will give you the file size in bytes that you could use.