Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
C# / VB.NET - Problema stringhe
Forum - C# / VB.NET - Problema stringhe

Avatar
zottiman (Normal User)
Pro


Messaggi: 121
Iscritto: 06/07/2009

Segnala al moderatore
Postato alle 19:55
Giovedì, 09/07/2009
Dim NewPath As String
        Dim fileList As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
        Dim Lung As Integer
        Dim NomeFile As String

        NomeFile = ""

        My.Computer.FileSystem.CurrentDirectory = txtDirectory.Text
        NewPath = My.Computer.FileSystem.CurrentDirectory

        fileList = My.Computer.FileSystem.GetFiles(My.Computer.FileSystem.CurrentDirectory)
        For Each foundFile As String In fileList

            Lung = Len(foundFile) - 1


            Do While foundFile.Chars(Lung) <> "\"
                Lung -= Lung - 1
            Loop

            NomeFile = Mid(foundFile, Lung)

            lstFilePick.Items.Add(foundFile)
        
        Next

PM Quote
Avatar
Jeremy (Normal User)
Pro


Messaggi: 134
Iscritto: 08/02/2009

Segnala al moderatore
Postato alle 19:58
Giovedì, 09/07/2009
Testo quotato

Postato originariamente da zottiman:

Dim NewPath As String
        Dim fileList As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
        Dim Lung As Integer
        Dim NomeFile As String

        NomeFile = ""

        My.Computer.FileSystem.CurrentDirectory = txtDirectory.Text
        NewPath = My.Computer.FileSystem.CurrentDirectory

        fileList = My.Computer.FileSystem.GetFiles(My.Computer.FileSystem.CurrentDirectory)
        For Each foundFile As String In fileList

            Lung = Len(foundFile) - 1


            Do While foundFile.Chars(Lung) <> "\"
                Lung -= Lung - 1
            Loop

            NomeFile = Mid(foundFile, Lung)

            lstFilePick.Items.Add(foundFile)
        
        Next




e quindi?

PM Quote
Avatar
zottiman (Normal User)
Pro


Messaggi: 121
Iscritto: 06/07/2009

Segnala al moderatore
Postato alle 20:05
Giovedì, 09/07/2009
Testo quotato

e quindi?



non riesco a capire dov'è l'errore, dove sbaglio.

PM Quote
Avatar
theprogrammer (Normal User)
Guru^2


Messaggi: 2509
Iscritto: 28/01/2009

Segnala al moderatore
Postato alle 20:12
Giovedì, 09/07/2009
Testo quotato

Postato originariamente da zottiman:

Testo quotato

e quindi?



non riesco a capire dov'è l'errore, dove sbaglio.



Ma sbagli cosa?

Perche' non commenti il codice indicando cosa dovrebbe fare e cosa invece fa ?

Insomma ... si devono dare le risposte e anche le domande ?

PM Quote
Avatar
Jeremy (Normal User)
Pro


Messaggi: 134
Iscritto: 08/02/2009

Segnala al moderatore
Postato alle 20:14
Giovedì, 09/07/2009
Testo quotato

Postato originariamente da zottiman:

e quindi?



Sbagli li .... non lo vedi? dove c'è il meno

Ultima modifica effettuata da Jeremy il 09/07/2009 alle 20:15
PM Quote