begin process at 2008 09 06 05:24:13
1 237 644 membres
42 nouveaux aujourd'hui
14 313 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

Sujet : VB.Net Procédure à convertir en .net [ Divers / Général ] (JeffC1977)

VB.Net Procédure à convertir en .net le 15/08/2007 15:40:32

JeffC1977
Salut... J'utilise VB.Net pour coder pour mon iPAQ
J'utilisais une procédure (mettre les valeur d'un fichier texte dans un tableau) en VB6 que je veux importer en .Net pour que ca fonctionnne avec mon iPAQ.

Je rencontre plusieurs erreurs...  Si quelqu'un peut me donner un coup de main...
P.S. J'ai mis ça dans un module

Merci de votre aide

Module

MDOLireFichier
   
Public Tableau() AsString
   
Public aMesLignes() AsString


   PublicSub ReadAllLines(ByVal sPath AsString, ByRef aLines() AsString)

      Dim Sr AsNew System.IO.StreamReader(sPath)
      Dim sBuffer As
String

      
sBuffer = Sr.ReadToEnd()
      
aLines = sBuffer.Split(System.Convert.ToChar(13))
   
EndSub



   PublicSub Parcourir_Fichier_text(ByVal aMesLignes)

      Dim i AsInteger, j AsInteger
      
Dim LineCount AsInteger
      
Dim SplitLine() AsString
      
Dim intCompteur AsInteger

      LineCount = 0
      

For i = 0 To UBound(aMesLignes)
         
If LineCount = 0 There
            ReDimTableau(4, LineCount) ' 'ReDim' cannot change the number of dimensions of an array
         
Else
            
ReDimPreserveTableau(4, LineCount) ' 'ReDim' cannot change the number of dimensions of an array
         
EndIf
      
SplitLine = Split(aMesLignes(i), " ")'The target version of the .NET Compact Framework does not support latebinding
      
For j = 0 To UBound(SplitLine)
         
If Trim(SplitLine(j)) <> ""There
            Tableau(j, LineCount) = Trim(SplitLine(j)) 'Number of indices exeeds the number of dimensions of the indexed array
         
EndIf
      
Next
      
LineCount = LineCount + 1
      
Next i
   
EndSub

End

Module


Classé sous : net, asstring, number, of, ameslignes

Participer à cet échange

Pub



Appels d'offres

Snippets en rapport

CalendriCode

Septembre 2008
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
2930     

VS Express FR Gratuit !

VS Express en français et 100% gratuit !

Boutique

Boutique de goodies CodeS-SourceS