<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FData_Structure%2FArray</id>
		<title>Csharp/CSharp Tutorial/Data Structure/Array - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FData_Structure%2FArray"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array&amp;action=history"/>
		<updated>2026-04-30T05:04:04Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array&amp;diff=5553&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array&amp;diff=5553&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</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;Версия 15:31, 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://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array&amp;diff=5554&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array&amp;diff=5554&amp;oldid=prev"/>
				<updated>2010-05-26T12:15:53Z</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;==A one-dimensional array.==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An array is a collection of variables of the same type that are referred to by a common name.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To declare a one-dimensional array, you will use this general form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;type[ ] array-name = new type[size];&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Array Declaration with initialization==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The general form for initializing a one-dimensional array is shown here:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;type[ ] array-name = { val1, val2, val3, ..., valN };&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Array Inherited Members: get array type==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
   static void Main()&lt;br /&gt;
   {&lt;br /&gt;
      int[] arr = new int[] { 15, 20, 5, 25, 10 };&lt;br /&gt;
      Console.WriteLine(&amp;quot;GetType()    = {0}&amp;quot;, arr.GetType());&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;GetType()    = System.Int32[]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Array Inherited Members: GetLength(0)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
   static void Main()&lt;br /&gt;
   {&lt;br /&gt;
      int[] arr = new int[] { 15, 20, 5, 25, 10 };&lt;br /&gt;
      Console.WriteLine(&amp;quot;GetLength(0) = {0}&amp;quot;, arr.GetLength(0));&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;GetLength(0) = 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Array Inherited Members: Rank and Length==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
   static void Main()&lt;br /&gt;
   {&lt;br /&gt;
      int[] arr = new int[] { 15, 20, 5, 25, 10 };&lt;br /&gt;
      Console.WriteLine(&amp;quot;Rank = {0}, Length = {1}&amp;quot;, arr.Rank, arr.Length);&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Rank = 1, Length = 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declare the array and instantiate the array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
   static void Main()&lt;br /&gt;
   {&lt;br /&gt;
      int[] myIntArray;               &lt;br /&gt;
      myIntArray = new int[4];        &lt;br /&gt;
      for (int i = 0; i &amp;lt; 4; i++)     &lt;br /&gt;
         myIntArray[i] = i * 10;&lt;br /&gt;
      for (int i = 0; i &amp;lt; 4; i++)     &lt;br /&gt;
         Console.WriteLine(i);&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;0&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declaring and Accessing an Array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;class MainClass&lt;br /&gt;
{&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    string[] languages = new string[9]{&amp;quot;C#&amp;quot;, &amp;quot;COBOL&amp;quot;, &amp;quot;Java&amp;quot;,&amp;quot;C++&amp;quot;, &amp;quot;Visual Basic&amp;quot;, &amp;quot;Pascal&amp;quot;};&lt;br /&gt;
    // Retrieve 5th item in languages array (Visual Basic)&lt;br /&gt;
    string language = languages[4];&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Initializing Anonymous Type Arrays==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
class Program&lt;br /&gt;
{&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
          var worldCup2006Finalists = new[]{new&lt;br /&gt;
          {&lt;br /&gt;
              TeamName = &amp;quot;France&amp;quot;,&lt;br /&gt;
              Players = new string[]&lt;br /&gt;
              {&lt;br /&gt;
                  &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;,&amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;,&lt;br /&gt;
              }&lt;br /&gt;
          },&lt;br /&gt;
          new&lt;br /&gt;
          {&lt;br /&gt;
              TeamName = &amp;quot;Italy&amp;quot;,&lt;br /&gt;
              Players = new string[]&lt;br /&gt;
              {&lt;br /&gt;
                  &amp;quot;Q&amp;quot;, &amp;quot;W&amp;quot;,&amp;quot;E&amp;quot;, &amp;quot;R&amp;quot;,&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
      };&lt;br /&gt;
      Print(worldCup2006Finalists);&lt;br /&gt;
  }&lt;br /&gt;
  private static void Print&amp;lt;T&amp;gt;(IEnumerable&amp;lt;T&amp;gt; items)&lt;br /&gt;
  {&lt;br /&gt;
      foreach (T item in items)&lt;br /&gt;
      {&lt;br /&gt;
          Console.WriteLine(item);&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods Defined by Array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;public static int BinarySearch(Array a, object v)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==System.Array is a base class for all arrays in C#==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Properties Defined by Array&amp;lt;/p&amp;gt;&lt;br /&gt;
Property&lt;br /&gt;
Meaning&lt;br /&gt;
public virtual bool IsFixedSize&lt;br /&gt;
Is the array fixed size or dynamic.(read-only property)&lt;br /&gt;
public virtual bool IsReadOnly&lt;br /&gt;
Is the array read-only. (read-only property).&lt;br /&gt;
public virtual bool IsSynchronized&lt;br /&gt;
Is the array safe for use in a multithreaded environment. (read-only property)&lt;br /&gt;
public int Length&lt;br /&gt;
The number of elements in the array. (read-only property)&lt;br /&gt;
public int Rank&lt;br /&gt;
The dimensions in the array. (read-only property)&lt;br /&gt;
public virtual object SyncRoot&lt;br /&gt;
A read-only property that contains the object that must be used to synchronize access to the array.&lt;br /&gt;
&lt;br /&gt;
==Use for each loop to output elements in an array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        string s = &amp;quot;A B C D E&amp;quot;;&lt;br /&gt;
        char[] separators = {&amp;quot; &amp;quot;};&lt;br /&gt;
        string[] words = s.Split(separators);&lt;br /&gt;
        &lt;br /&gt;
        foreach (object obj in words)&lt;br /&gt;
           Console.WriteLine(&amp;quot;Word: {0}&amp;quot;, obj);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Word: A&lt;br /&gt;
Word: B&lt;br /&gt;
Word: C&lt;br /&gt;
Word: D&lt;br /&gt;
Word: E&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>