Dev2.Activities.GetSystemInformationHelper.GetDiskSpaceTotalInformation C# (CSharp) Method

GetDiskSpaceTotalInformation() public method

public GetDiskSpaceTotalInformation ( ) : string
return string
        public string GetDiskSpaceTotalInformation()
        {
            var stringBuilder = new StringBuilder();
            foreach(DriveInfo driveInfo1 in DriveInfo.GetDrives())
            {
                try
                {
                    stringBuilder.AppendFormat("{0}" + " {1},",
                        driveInfo1.Name, ConvertToGB(driveInfo1.TotalSize));
                }
                catch(Exception ex)
                {
                    Dev2Logger.Log.Error(ex);
                }
            }
            return stringBuilder.ToString().TrimEnd(',');
        }