# .NET and More > Silverlight >  MainPage.xaml.cs and creating another class.cs

## brownjf22

I have an assignment to display area and circumference of a circle. Write a circle class that calculates and instantiates circle object of user entered radius. I have created the UI (mainpage) with textblock, textbox and a button.  Double click button and have the event, I also created a circle.cs class.  I need help with where to code the calculate circle method.  Have the following code, it works but not what professor asked:
   namespace mobilecpt7ex1circle
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }
        private void Calculate_Click(object sender, RoutedEventArgs e)
        {
            double r = Convert.ToDouble(Radius.Text);
            Area.Text = (Math.PI * r * r).ToString();
            Circumference.Text = (Math.PI * 2 * r).ToString();           
        }

----------

