Interview Question in LINQ


 

Interview Question :: cSharp static class error message help

I have the following code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PhoneStore
{

static class Utils
{


static double CalculateSalesTax(double x)
{
x = x * 1.0625;
return y;

}
}

}

when i compile I get the following error

error CS0723: Cannot declare a variable of static type 'PhoneStore.Utils'

I don't understand what this means or how to correct it, any help would be great
thanks
by ksk
VoteNowAnswers to "cSharp static class error message help"

 

dude it works!!

 using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ConsoleApplication1
{
    static class Utils
    {
        static void Main(string[] args)
        {
           double y= calculateSalesTax(4);
           Console.WriteLine(y);
            Console.Read();
        }
 
      static double calculateSalesTax(double p)
        {
            p = p * 1.0675;
                return p;
        }
    }
}