VS C# 2008 Object Reference Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    #1

    VS C# 2008 Object Reference Error

    The snippet below is from a small console app I'm playin' around with in C#.
    Upon building the app, I receive the error message "An object reference is
    required for the non-static field, method, or property
    bla.bla.ConvTem poToMillisecond s(int)".



    int tempo = Convert.ToInt32 (args[1]);

    // ERROR on following line

    display(ConvTem poToMillisecond s(tempo));


    return;

    }

    public int ConvTempoToMill iseconds(int tempo)

    {

    // duration = 60000 / tempo

    return 60000 / tempo;

    }

    Thanks for your thoughts,

    Mike

Working...