<?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%2FLanguage_Basics%2FFunction_Parameter</id>
		<title>VB.Net/Language Basics/Function Parameter - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FLanguage_Basics%2FFunction_Parameter"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/Language_Basics/Function_Parameter&amp;action=history"/>
		<updated>2026-04-06T00:10:00Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/Language_Basics/Function_Parameter&amp;diff=204&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/Language_Basics/Function_Parameter&amp;diff=204&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</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/Language_Basics/Function_Parameter&amp;diff=205&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/Language_Basics/Function_Parameter&amp;diff=205&amp;oldid=prev"/>
				<updated>2010-05-26T12:42:12Z</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;==Calculates the power of a value, defaults to square==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    Shared Sub Main(ByVal args As String())&lt;br /&gt;
      Dim value As Integer&lt;br /&gt;
      &amp;quot; call version of Power depending on power input&lt;br /&gt;
      value = Power(Convert.ToInt32(3), _&lt;br /&gt;
           Convert.ToInt32(10))&lt;br /&gt;
      Console.WriteLine( Convert.ToString(value) )&lt;br /&gt;
    End Sub&lt;br /&gt;
   &amp;quot; use iteration to calculate power&lt;br /&gt;
   Shared Function Power(ByVal base As Integer, _&lt;br /&gt;
      Optional ByVal exponent As Integer = 2) As Integer&lt;br /&gt;
      Dim total As Integer = 1&lt;br /&gt;
      Dim i As Integer&lt;br /&gt;
      For i = 1 To exponent&lt;br /&gt;
         total *= base&lt;br /&gt;
      Next&lt;br /&gt;
      Return total&lt;br /&gt;
   End Function &amp;quot; Power&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pass Array as Parameters==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    Shared Sub Main(ByVal args As String())&lt;br /&gt;
        Dim friends() As String = {&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;C&amp;quot;,&amp;quot;D&amp;quot;, &amp;quot;E&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
        AddFriendsToList(friends)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub AddFriendsToList(ByVal friends() As String)&lt;br /&gt;
        Dim friendName As String&lt;br /&gt;
        &lt;br /&gt;
        For Each friendName In friends&lt;br /&gt;
            Console.WriteLine(&amp;quot;[&amp;quot; &amp;amp; friendName &amp;amp; &amp;quot;]&amp;quot;)&lt;br /&gt;
        Next&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two Dimension Array: Pass into a Function==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    Shared Sub Main(ByVal args As String())&lt;br /&gt;
        &amp;quot; define an array to hold friends in...&lt;br /&gt;
        Dim friends(2, 2) As String&lt;br /&gt;
        &amp;quot; set the data...&lt;br /&gt;
        friends(0, PersonDataIndex.Name) = &amp;quot;Name 1&amp;quot;&lt;br /&gt;
        friends(0, PersonDataIndex.Email) = &amp;quot;Email 1&amp;quot;&lt;br /&gt;
        friends(0, PersonDataIndex.Sex) = &amp;quot;Sex 1&amp;quot;&lt;br /&gt;
        friends(1, PersonDataIndex.Name) = &amp;quot;Name 2&amp;quot;&lt;br /&gt;
        friends(1, PersonDataIndex.Email) = &amp;quot;Email 2&amp;quot;&lt;br /&gt;
        friends(1, PersonDataIndex.Sex) = &amp;quot;Ses 2&amp;quot;&lt;br /&gt;
        friends(2, PersonDataIndex.Name) = &amp;quot;Name 3&amp;quot;&lt;br /&gt;
        friends(2, PersonDataIndex.Email) = &amp;quot;Email 3&amp;quot;&lt;br /&gt;
        friends(2, PersonDataIndex.Sex) = &amp;quot;Sex 3&amp;quot;&lt;br /&gt;
        AddFriendsToList(friends)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub AddFriendsToList(ByVal friends(,) As String)&lt;br /&gt;
        Dim row As Integer&lt;br /&gt;
        For row = 0 To UBound(friends, 1)&lt;br /&gt;
            Dim buf As String = &amp;quot;&amp;quot;&lt;br /&gt;
            Dim column As Integer&lt;br /&gt;
            For column = 0 To UBound(friends, 2)&lt;br /&gt;
                buf &amp;amp;= friends(row, column) &amp;amp; &amp;quot;, &amp;quot;&lt;br /&gt;
            Next&lt;br /&gt;
            &lt;br /&gt;
            Console.WriteLine(buf)&lt;br /&gt;
        Next&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
    Public Enum PersonDataIndex As Integer&lt;br /&gt;
        Name = 0&lt;br /&gt;
        Email = 1&lt;br /&gt;
        Sex = 2&lt;br /&gt;
    End Enum&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Use Array as Function Parameter==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    Shared Sub Main(ByVal args As String())&lt;br /&gt;
         Dim a As Integer = 5&lt;br /&gt;
         Dim b As Integer = 6&lt;br /&gt;
         Dim c As Integer = 7&lt;br /&gt;
         Console.WriteLine(&amp;quot;Calling with three Integers&amp;quot;)&lt;br /&gt;
         DisplayVals(a, b, c)&lt;br /&gt;
         Console.WriteLine(&amp;quot;Calling with four Integers&amp;quot;)&lt;br /&gt;
         DisplayVals(5, 6, 7, 8)&lt;br /&gt;
         Console.WriteLine(&amp;quot;calling with an array of four Integers&amp;quot;)&lt;br /&gt;
         Dim explicitArray( ) As Integer = {5, 6, 7, 8}&lt;br /&gt;
         DisplayVals(explicitArray)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Shared Public Sub DisplayVals(ByVal ParamArray intVals( ) As Integer)&lt;br /&gt;
        Dim i As Integer&lt;br /&gt;
        For Each i In intVals&lt;br /&gt;
           Console.WriteLine(&amp;quot;DisplayVals {0}&amp;quot;, i)&lt;br /&gt;
        Next i&lt;br /&gt;
    End Sub &amp;quot;DisplayVals&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>