منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : شرح الكود و الادوات المستخدمة
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
لو تكرمت ان تشرح لي هذا الكود و الادوات المستخدمة 


Private Shared Sub __ENCAddToList(ByVal value As Object)

   Dim list As List(Of WeakReference) = Form18.__ENCList

   SyncLock list

       If (Form18.__ENCList.Count = Form18.__ENCList.CapacityThen

           Dim index As Integer = 0

           Dim num3 As Integer = (Form18.__ENCList.Count - 1)

           Dim i As Integer = 0

           Do While (i <= num3)

               Dim reference As WeakReference = Form18.__ENCList.Item(i)

               If reference.IsAlive Then

                   If (i <> index) Then

                       Form18.__ENCList.Item(index) = Form18.__ENCList.Item(i)

                   End If

                   index += 1

               End If

               i += 1

           Loop

           Form18.__ENCList.RemoveRange(index, (Form18.__ENCList.Count - index))

           Form18.__ENCList.Capacity = Form18.__ENCList.Count

       End If

       Form18.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))

   End SyncLock

End Sub
هذا ليس الكود الأصلي و لكنه وعلي ما أظن ناتج من Compiler الخاص بلغة الفيجوال بيسك