1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| Imports System.IO
MustInherit Class Contact
Dim _Id As Guid
Dim _Nom As String = ""
Dim _Prenom As String = ""
Dim _Adresse As String = ""
Dim _Telephone As String = ""
Dim _Gsm As String = ""
Dim _Fax As String = ""
Dim _Mail As String = ""
Public ReadOnly Property Id As Guid
Get
_Id = New Guid
End Get
End Property
Public Property Nom(ByVal _Nom As String) As String
Get
Return _Nom
End Get
Set(value As String)
_Nom = value
End Set
End Property
Public Property Prenom(ByVal _Prenom As String) As String
Get
Return _Prenom
End Get
Set(value As String)
_Prenom = value
End Set
End Property
Public Property Adresse(ByVal _Adresse As String) As String
Get
Return _Adresse
End Get
Set(value As String)
_Adresse = value
End Set
End Property
Public Property Telephone(ByVal _Telephone As String) As String
Get
Return _Telephone
End Get
Set(value As String)
_Telephone = value
End Set
End Property
Public Property Gsm(ByVal _Gsm As String) As String
Get
Return _Gsm
End Get
Set(value As String)
_Gsm = value
End Set
End Property
Public Property Fax(ByVal _Fax As String) As String
Get
Return _Fax
End Get
Set(value As String)
_Fax = value
End Set
End Property
Public Property Mail(ByVal _Mail As String) As String
Get
Return _Mail
End Get
Set(value As String)
_Mail = value
End Set
End Property
Sub New(ByVal Nom As String, ByVal Prenom As String, ByVal Adresse As String, ByVal Telephone As String, ByVal Gsm As String, ByVal Fax As String, ByVal Mail As String)
Me._Nom = Nom
Me._Prenom = Prenom
Me._Adresse = Adresse
Me._Telephone = Telephone
Me._Gsm = Gsm
Me._Fax = Fax
Me._Mail = Mail
End Sub
Sub CreationFichier()
Dim MonFichier As IO.FileStream = New IO.FileStream("FichierSauvegarde.txt", FileMode.OpenOrCreate)
End Sub
Private Class Serialisation
Dim list As New List(Of Contact)
End Class
End Class |
Partager