Introduction
In this article I will describe how to swap the values of two arrays. Previously, I have always swapped the values of variables. But now I have decided, why not interchange the values of two arrays. So in this article we are doing something different.
Use the following procedure to create it.
Step 1
First of all you must create a new Windows Store Application.
- Open Visual Studio 2012
- "File" -> "New" -> "Project..."
- Choose "Template" -> "Visual C#" -> "Window Store app"
- Choose "Blank App (XAML)" then rename the application

Step 2
Write the following XAML code in "Mainpage.Xaml" (that is available in Solution Explorer):
<Page
x:Class="swap_array_app.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:swap_array_app"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Red">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="275*"/>
<ColumnDefinition Width="321*"/>
<ColumnDefinition Width="770*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60*"/>
<RowDefinition Height="41*"/>
<RowDefinition Height="42*"/>
<RowDefinition Height="56*"/>
<RowDefinition Height="44*"/>
<RowDefinition Height="45*"/>
<RowDefinition Height="43*"/>
<RowDefinition Height="50*"/>
<RowDefinition Height="56*"/>
<RowDefinition Height="331*"/>
</Grid.RowDefinitions>
<TextBlock Text="First array before swapping " Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Foreground="White" FontSize="20" FontWeight="ExtraBold" Width="258"></TextBlock>
<TextBlock x:Name="text1" Grid.Column="1" Grid.Row="2" Width="200" HorizontalAlignment="Left" Foreground="White" FontSize="20"></TextBlock>
<TextBlock Text="Second array before swapping " Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" Foreground="White" FontSize="20" FontWeight="ExtraBold" Width="285"></TextBlock>
<TextBlock x:Name="text2" Grid.Column="1" Grid.Row="4" Width="285" HorizontalAlignment="Left" Foreground="White" FontSize="20"></TextBlock>
<TextBlock Text="First array After swapping " Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Foreground="White" FontSize="20" FontWeight="ExtraBold" Width="258" Visibility="Collapsed" Name="hidetextblock1"></TextBlock>


Join the conversation! Your thoughts help the community grow.