Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4599772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:35:20+00:00 2026-05-21T23:35:20+00:00

I have a simple demo of mvp below: public partial class _Default : System.Web.UI.Page,

  • 0

I have a simple demo of mvp below:

public partial class _Default : System.Web.UI.Page, IView
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    #region IView Members

    public string RadiusText
    {
        get { return TextRadius.Text; }
        set { TextRadius.Text = value; }
    }

    public string ResultText
    {
        get { return LabelResult.Text; }
        set { LabelResult.Text = value; }
    }

    #endregion
    protected void ButtonResult_Click(object sender, EventArgs e)
    {
        CPresenter presenter = new CPresenter(this);
        presenter.CalculateCircleArea();
    }
}

/// <summary>
/// interface view 1
/// </summary>
public interface ICircleModel
{
    double getArea(double radius);
}

public class CModel : ICircleModel
{
    public CModel() { }

    #region ICircleModel Members

    public double getArea(double radius)
    {
        return Math.PI * radius * radius;
    }

    #endregion
}

/// <summary>
/// interface view 2
/// </summary>
public interface IView
{
    string RadiusText { get; set; }
    string ResultText { get; set; }
}


/// <summary>
/// Summary description for Presenter
/// </summary>
public class CPresenter
{
    IView mview;
    public CPresenter(IView view)
    {
        mview = view;
    }
    public double CalculateCircleArea()
    {
        CModel model = new CModel();
        mview.ResultText = model.getArea(Double.Parse(mview.RadiusText)).ToString();
        return mview.ResultText.ToString();
    }
}

error i m getting is:

Error 1 Cannot implicitly convert type ‘string’ to ‘double’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:35:20+00:00Added an answer on May 21, 2026 at 11:35 pm

    Your CalculateCircleArea() method in your CPresenter class is returning a string when the method signature defines a double as the retrurn parameter. Either change the return parameter to a string or return a double from within the method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made a simple grabbing demo page . It doesn't have any easing/acceleration. I
I have a simple struct: typedef struct { void *things; int sizeOfThings; } Demo;
I use example 3 given in this page: http://simple-navigation-demo.andischacke.com/ and I have a problem
I am about to create a simple demo in flash where I have 3
I have a very simple demo working that uses Webkit transforms and transitions for
i have a string like this: some_string=A simple demo of SMS text messaging. +
i have a string like this: some_string = A simple demo of SMS text
I have a simple Spring.NET demo, and I'm trying to have a shared object
In My Application i have Implement the Simple Gallery Demo. Here i am going
In a simple demo web app using JSF 2 and Ajax, there is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.