<?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_Clone</id>
		<title>Csharp/CSharp Tutorial/Data Structure/Array Clone - История изменений</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_Clone"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array_Clone&amp;action=history"/>
		<updated>2026-04-30T07:45:46Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Data_Structure/Array_Clone&amp;diff=5567&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_Clone&amp;diff=5567&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_Clone&amp;diff=5568&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_Clone&amp;diff=5568&amp;oldid=prev"/>
				<updated>2010-05-26T12:15:56Z</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;==Clone array with reference data inside==&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 MyClass&lt;br /&gt;
{&lt;br /&gt;
   public int Value = 5;&lt;br /&gt;
}&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
   static void Main()&lt;br /&gt;
   {&lt;br /&gt;
      MyClass[] orignalArray = new MyClass[3] { new MyClass(), new MyClass(), new MyClass() }; &lt;br /&gt;
      &lt;br /&gt;
      MyClass[] cloneArray = (MyClass[])orignalArray.Clone();                   &lt;br /&gt;
      cloneArray[0].Value = 1;                               &lt;br /&gt;
      cloneArray[1].Value = 2;&lt;br /&gt;
      cloneArray[2].Value = 3;&lt;br /&gt;
      foreach (MyClass a in orignalArray)&lt;br /&gt;
         Console.WriteLine(a.Value);&lt;br /&gt;
      foreach (MyClass a in cloneArray)&lt;br /&gt;
         Console.WriteLine(a.Value);&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clone Value 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[] orignalArray = { 1, 2, 3 };                    &lt;br /&gt;
      int[] cloneArray = (int[])orignalArray.Clone();         &lt;br /&gt;
      cloneArray[0] = 10;&lt;br /&gt;
      cloneArray[1] = 20;&lt;br /&gt;
      cloneArray[2] = 30;&lt;br /&gt;
      foreach (int i in orignalArray)&lt;br /&gt;
         Console.WriteLine(i);&lt;br /&gt;
      foreach (int i in cloneArray)&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;1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
10&lt;br /&gt;
20&lt;br /&gt;
30&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cloning 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;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Collections.ObjectModel;&lt;br /&gt;
using System.Text;&lt;br /&gt;
class GoodMonthType {&lt;br /&gt;
    private static readonly string[] monthConstants = new string[] {&lt;br /&gt;
        &amp;quot;January&amp;quot;, &amp;quot;February&amp;quot;, &amp;quot;March&amp;quot;, &amp;quot;April&amp;quot;, &amp;quot;May&amp;quot;, &amp;quot;June&amp;quot;,&lt;br /&gt;
        &amp;quot;July&amp;quot;, &amp;quot;August&amp;quot;, &amp;quot;September&amp;quot;, &amp;quot;October&amp;quot;, &amp;quot;November&amp;quot;, &amp;quot;December&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
    public string[] Months&lt;br /&gt;
    {&lt;br /&gt;
        get { return (string[])monthConstants.Clone(); }&lt;br /&gt;
    }&lt;br /&gt;
    public IEnumerable&amp;lt;string&amp;gt; MonthsEnumerable&lt;br /&gt;
    {&lt;br /&gt;
        get { return Array.AsReadOnly&amp;lt;string&amp;gt;(monthConstants); }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        GoodMonthType mt2 = new GoodMonthType();&lt;br /&gt;
        &lt;br /&gt;
        foreach (string m in mt2.Months) {&lt;br /&gt;
            Console.WriteLine(m);&lt;br /&gt;
        }&lt;br /&gt;
        string[] months2 = mt2.Months;&lt;br /&gt;
        months2[3] = &amp;quot;Not-April&amp;quot;;&lt;br /&gt;
        foreach (string m in mt2.Months) {&lt;br /&gt;
            Console.WriteLine(m);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;January&lt;br /&gt;
February&lt;br /&gt;
March&lt;br /&gt;
April&lt;br /&gt;
May&lt;br /&gt;
June&lt;br /&gt;
July&lt;br /&gt;
August&lt;br /&gt;
September&lt;br /&gt;
October&lt;br /&gt;
November&lt;br /&gt;
December&lt;br /&gt;
January&lt;br /&gt;
February&lt;br /&gt;
March&lt;br /&gt;
April&lt;br /&gt;
May&lt;br /&gt;
June&lt;br /&gt;
July&lt;br /&gt;
August&lt;br /&gt;
September&lt;br /&gt;
October&lt;br /&gt;
November&lt;br /&gt;
December&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>