Introduction
In my previous article I described how to Delete specific element of an array and in this article I explain how to insert an element at a specific position and also do not increate the size of the array.
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="delete_specific_element_from_array.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:delete_specific_element_from_array"
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.RowDefinitions>
<RowDefinition Height="72*"/>
<RowDefinition Height="38*"/>
<RowDefinition Height="42*"/>
<RowDefinition Height="35*"/>
<RowDefinition Height="40*"/>
<RowDefinition Height="79*"/>
<RowDefinition Height="36*"/>
<RowDefinition Height="33*"/>
<RowDefinition Height="40*"/>
<RowDefinition Height="42*"/>
<RowDefinition Height="311*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="248*"/>
<ColumnDefinition Width="407*"/>
<ColumnDefinition Width="257*"/>
<ColumnDefinition Width="454*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Enter Element of an array" FontFamily="Arial" Grid.Column="1" Grid.Row="2" Foreground="White" FontSize="20" FontWeight="ExtraBold" ></TextBlock>
<TextBox x:Name="textbox1" Grid.Column="2" Grid.Row="2" Width="200" HorizontalAlignment="Left" VerticalAlignment="Top" Height="32"></TextBox>
<Button x:Name="button1" Content="Insert" Grid.Column="2" Grid.Row="3" Background="Yellow" Foreground="Black" Width="97" Height="35" Click="button1_Click" ></Button>
<TextBlock x:Name="text1" FontFamily="Arial" Grid.Column="3" Grid.Row="2" FontSize="20" FontWeight="ExtraBold" ></TextBlock>
<Button x:Name="button2" Content="show array element" Background="Yellow" Foreground="Black" Grid.Column="2" Grid.Row="4" Height="40" Width="171" Click="button2_Click"/>
<TextBlock x:Name="text2" FontFamily="Arial" Grid.Column="1" Grid.Row="5" FontSize="20" FontWeight="ExtraBold" ></TextBlock>
<TextBlock Text="Enter the position for insert Number" FontFamily="Arial" Grid.Column="1" Grid.Row="6" FontSize="20" FontWeight="ExtraBold" Grid.RowSpan="2" ></TextBlock>

Join the conversation! Your thoughts help the community grow.