471,330 Members | 1,239 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

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

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

// ERROR on following line



public int ConvTempoToMilliseconds(int tempo)


// duration = 60000 / tempo

return 60000 / tempo;


Thanks for your thoughts,


Jun 27 '08 #1
0 762

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.