Introduction
My previous article explained how to convert Decimal to Octal number and in this article I explain how to convert a number expressed as an octal number to a number expressed as a decimal number. So let us first of all understand the conversion.
Octal Number: A number expressed using the base 8 number system with digits 0 to 7.
Decimal Number: A number expressed using the base 10 number system with digits 0 to 9.
Conversion Example: suppose you want to convert an octal number 764 to decimal number. Then use the following procedure.
Step 1 : 4 * 8^0 =4 * 1=4
Step 2 : 6 * 8^1= 6* 8=48
Step 3 : 7* 8^2=7*64= 448
Hence equivalent decimal number = 4 + 48 + 448 = 500
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="Octal_to_Decimal_converter_app.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Octal_to_Decimal_converter_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="313*"/>
<ColumnDefinition Width="254*"/>
<ColumnDefinition Width="788*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="78*"/>
<RowDefinition Height="49*"/>
<RowDefinition Height="37*"/>
<RowDefinition Height="40*"/>
<RowDefinition Height="39*"/>
<RowDefinition Height="525*"/>
</Grid.RowDefinitions>
<TextBlock Text="Octal to Decimal Converter app" Grid.ColumnSpan="3" Grid.Row="1" Foreground="White" FontSize="20" FontFamily="Arial" TextAlignment="Center"></TextBlock>

Sam HobbsPosted Feb 17, 2013, 5:14 PM
Does int.Parse convert from base 8 or base 10? Also, I think the button1_Click method can be simplified as: int i = Convert.ToInt32(textbox1.Text, 8); text1.Text = Convert.ToString(i, 10);