Can anyone help, why do i get: Error 1 'Length' is not declared. It may be inaccessible due to its protection level. H:\X17-59183\PostInstall\PostInstall\SelectPrograms.vb 111 51 PostInstallCode:Public Function getFileSize(ByVal path As String) As String Dim sizes() As String = New String() {"B", "KB", "MB", "GB"} Dim len As Double = (New FileInfo(path) + Length) Dim order As Integer = 0 While ((len >= 1024) _ AndAlso (order + (1 < sizes.Length))) order = (order + 1) len = (len / 1024) End While Return String.Format("{0:0.##} {1}", len, sizes(order)) End Function




Reply With Quote