0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Calculator
/// </summary>
/// 


public class Calculator
{

    public double Add(double a, double b)
{
       return a + b;
}
    public double Subtract(double a, double b)
    {
        return a - b;
    }
    public double Multiply(double a, double b)
    {
        return a * b;
    }
    public double Divide(double a, double b)
    {
        return a / b;
    }
}

getting error 'Type or namespace definition, or end-of-file expected'
and
Unexpected character '−'

3
Contributors
3
Replies
28
Views
4 Years
Discussion Span
Last Post by muhammad.ibraheem_1
0

getting error 'Type or namespace definition, or end-of-file expected'

There's nothing wrong with the code. Was there more to it?

0

yea there was no error in code actually VS 2012 was giving errors and when i restarted it errors were gone.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.