Bonsoir à tous,
J'arrive à serializer une classe sauf les membres déclarés "Shared" comme ceci :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
    <Serializable()>
    Public Class clsVideoData
        <NonSerialized()> Private Shared _Container As PictureBox
        <NonSerialized()> Private Shared _ListBox As ListBox
        <NonSerialized()> Private Shared _ContainerVideo As PictureBox
        <NonSerialized()> Private Shared _ComboBoxLogo As ComboBox
        ' Informations generales sur la video
        Private Shared _NbFrames As Integer
        Private Shared _Fps As Integer
        Private Shared _Durée As Double
        Private Shared _AverageFrame As Double
        Private Shared _SARWidht As Integer
        Private Shared _SARHeight As Integer
        Private Shared _SCGx As Integer
        Private Shared _SCGy As Integer
        Private Shared _SCGxTl As Integer
        Private Shared _SCGyTl As Integer
        Private _Cuts As New clsCuts
        Private _Crops As New clsCrops
        Private _Logo As New clsLogo
        <NonSerialized()> Private Shared _Logos As New clsLogos
 
        Public Sub New()
 
        End Sub
 
        Public Sub Clear()
            _Container.Controls.Clear()
            _ListBox.Items.Clear()
            _Cuts.Clear()
            _Crops.Clear()
            _Logo.Clear()
        End Sub
        Public Shared Property Container As PictureBox
            Get
                Return _Container
            End Get
            Set(ByVal value As PictureBox)
                _Container = value
                _SCGxTl = _Container.Width
                _SCGyTl = _Container.Height
            End Set
        End Property
        Public Shared Property ListBox As ListBox
            Get
                Return _ListBox
            End Get
            Set(ByVal value As ListBox)
                _ListBox = value
                '_SCGx = _ContainerVideo.Width
                '_SCGy = _ContainerVideo.Height
            End Set
        End Property
        Public Shared Property ContainerVideo As PictureBox
            Get
                Return _ContainerVideo
            End Get
            Set(ByVal value As PictureBox)
                _ContainerVideo = value
                _SCGx = _ContainerVideo.Width
                _SCGy = _ContainerVideo.Height
            End Set
        End Property
        Public Shared Property ComboBoxLogo As ComboBox
            Get
                Return _ComboBoxLogo
            End Get
            Set(ByVal value As ComboBox)
                _ComboBoxLogo = value
            End Set
        End Property
        Public Shared Property NbFrames As Integer
            Get
                Return _NbFrames
            End Get
            Set(ByVal value As Integer)
                _NbFrames = value
                If Not _NbFrames = 0 Then AverageFrame = _Durée / _NbFrames
            End Set
        End Property
......
End Class
Savez vous comment Serializer les membres partagés comme par exemple la propriété NbFrames ?

En vous remerciant par avance.