<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FCollections%2FArray_Object</id>
		<title>VB.Net Tutorial/Collections/Array Object - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FCollections%2FArray_Object"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Collections/Array_Object&amp;action=history"/>
		<updated>2026-04-05T21:59:09Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Collections/Array_Object&amp;diff=2927&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Collections/Array_Object&amp;diff=2927&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Collections/Array_Object&amp;diff=2928&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Collections/Array_Object&amp;diff=2928&amp;oldid=prev"/>
				<updated>2010-05-26T12:53:46Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Object array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Option Strict On&lt;br /&gt;
 Imports System&lt;br /&gt;
 &lt;br /&gt;
 MustInherit Public Class Control&lt;br /&gt;
    Public Sub New(top As Integer, left As Integer)&lt;br /&gt;
       Me.top = top&lt;br /&gt;
       Me.left = left&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public MustOverride Sub DrawControl( )&lt;br /&gt;
    Protected top As Integer&lt;br /&gt;
    Protected left As Integer&lt;br /&gt;
 End Class &lt;br /&gt;
 Public Class Label&lt;br /&gt;
    Inherits Control&lt;br /&gt;
    Public Sub New(top As Integer, left As Integer, contents As String)&lt;br /&gt;
       MyBase.New(top, left) &lt;br /&gt;
       listBoxContents = contents&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Overrides Sub DrawControl( )&lt;br /&gt;
       Console.WriteLine(&amp;quot;Writing string to the listbox: {0}&amp;quot;, listBoxContents)&lt;br /&gt;
    End Sub &lt;br /&gt;
    Private listBoxContents As String &lt;br /&gt;
 End Class&lt;br /&gt;
 Public Class Button&lt;br /&gt;
    Inherits Control&lt;br /&gt;
    Public Sub New(top As Integer, left As Integer)&lt;br /&gt;
       MyBase.New(top, left)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Overrides Sub DrawControl( )&lt;br /&gt;
       Console.WriteLine(&amp;quot;Drawing a button at {0}, {1}&amp;quot; + ControlChars.Lf, top, left)&lt;br /&gt;
    End Sub &lt;br /&gt;
 End Class&lt;br /&gt;
 Public Class Tester&lt;br /&gt;
    Shared Sub Main( )&lt;br /&gt;
       Dim winArray(3) As Control&lt;br /&gt;
       winArray(0) = New Label(1, 2, &amp;quot;A&amp;quot;)&lt;br /&gt;
       winArray(1) = New Label(3, 4, &amp;quot;B&amp;quot;)&lt;br /&gt;
       winArray(2) = New Button(5, 6)&lt;br /&gt;
       Dim i As Integer&lt;br /&gt;
       For i = 0 To 2&lt;br /&gt;
          winArray(i).DrawControl( )&lt;br /&gt;
       Next i&lt;br /&gt;
    End Sub &amp;quot;Main&lt;br /&gt;
 End Class &amp;quot;Tester&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Writing string to the listbox: A&lt;br /&gt;
Writing string to the listbox: B&lt;br /&gt;
Drawing a button at 5, 6&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Populate Object array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Option Strict On&lt;br /&gt;
 Imports System&lt;br /&gt;
 Public Class Employee&lt;br /&gt;
     Private empID As Integer&lt;br /&gt;
     Public Sub New(ByVal empID As Integer)&lt;br /&gt;
         Me.empID = empID&lt;br /&gt;
     End Sub&lt;br /&gt;
 End Class&lt;br /&gt;
 Class Tester&lt;br /&gt;
     Shared Sub Main()&lt;br /&gt;
         Dim intArray As Integer()&lt;br /&gt;
         Dim empArray As Employee()&lt;br /&gt;
         intArray = New Integer(5) {}&lt;br /&gt;
         empArray = New Employee(3) {}&lt;br /&gt;
         Dim i As Integer&lt;br /&gt;
         For i = 0 To empArray.Length - 1&lt;br /&gt;
             empArray(i) = New Employee(i + 5)&lt;br /&gt;
             i = i + 1&lt;br /&gt;
         Next&lt;br /&gt;
     End Sub&lt;br /&gt;
 End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort a custom object array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Public Class Tester&lt;br /&gt;
    Public Shared Sub Main&lt;br /&gt;
        Dim arrayToSort() As Employee = { _&lt;br /&gt;
           New Employee(&amp;quot;F&amp;quot;, &amp;quot;O&amp;quot;), _&lt;br /&gt;
           New Employee(&amp;quot;V&amp;quot;, &amp;quot;O&amp;quot;), _&lt;br /&gt;
           New Employee(&amp;quot;F&amp;quot;, &amp;quot;A&amp;quot;), _&lt;br /&gt;
           New Employee(&amp;quot;V&amp;quot;, &amp;quot;C&amp;quot;), _&lt;br /&gt;
           New Employee(&amp;quot;F&amp;quot;, &amp;quot;G&amp;quot;)}&lt;br /&gt;
        Array.Sort(arrayToSort)&lt;br /&gt;
        For Each food As Employee In arrayToSort&lt;br /&gt;
            Console.WriteLine(food.ToString())&lt;br /&gt;
        Next food&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Employee&lt;br /&gt;
    Implements IComparable&lt;br /&gt;
    Public FirstName As String&lt;br /&gt;
    Public LastName As String&lt;br /&gt;
    Public Sub New(ByVal theGroup As String, ByVal theItem As String)&lt;br /&gt;
        FirstName = theGroup&lt;br /&gt;
        LastName = theItem&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Overrides Function ToString() As String&lt;br /&gt;
        Return FirstName &amp;amp; &amp;quot;: &amp;quot; &amp;amp; LastName&lt;br /&gt;
    End Function&lt;br /&gt;
    Public Function CompareTo(ByVal obj As Object) As Integer _&lt;br /&gt;
            Implements System.IComparable.rupareTo&lt;br /&gt;
        Dim compareValue As String&lt;br /&gt;
        compareValue = obj.ToString()&lt;br /&gt;
        Return String.rupare(Me.ToString(), compareValue)&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;F: A&lt;br /&gt;
F: G&lt;br /&gt;
F: O&lt;br /&gt;
V: C&lt;br /&gt;
V: O&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>