Bonjour a tous,

Ya t-il qlqun qui peut m'aider a transcrire des portion de code VB en C#?
Je n'ai aucune notion de VB dou la difficulte pour moi.
C'est code sont dans un tutoriel que je voudrai essayer mais il n'existe pas en version C#.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
Dim OFD As New OpenFileDialog()
Dim SR As System.IO.StreamReader
OFD.Filter = "fichier Excel (csv) | *.csv"
If OFD.ShowDialog = Windows.Forms.DialogResult.OK Then
Try
 SR = New System.IO.StreamReader(OFD.FileName)
 SR.Close()
Catch Ex As Exception
 MsgBox(Ex.Message, MsgBoxStyle.Exclamation)
End Try
End IF
OFD.Dispose()
D'avance merci
Jess