static method and non-static menthod
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cash
{
class Program
{
static void Main(string[] args)
{
(new Program()).run();
// writeFee(calculate(dailyRate, workDay));
// 对于非 static 方法,若想像上面这样直接调用则会报以下错
// Error 1 An object reference is required
// for the non-static field, method, or
// property 'Cash.Program.readDouble(string)'
printfOtherthing("static method is called."); // static 方法可直接调用
Program program = new Program(); // 非 static 方法需要先创建一个对象
// 然后用对象调用
program.printSomething("non-static menthod is called.");
}
public void run()
{
double daily