C# Get directory size using LINQ, c# GetDirectorySize

C# Get directory size using LINQ, DirectorySize Sometimes you need or must know the folder DirectorySize or frin more directories in C#. In this case you can use this method, which get the folder size in c#, the output size is in bytes. public static long DirectorySize(string parentDirectory) { return new DirectoryInfo(parentDirectory).GetFiles(searchPattern: "*", searchOption: SearchOption.AllDirectories).Sum(file => … Weiterlesen