An object reference is required for the non-static field, method, or property using global variable
- by Jose Cardama
Hello Iam working in a global int in which a variable will be used later. I've made the global variable like this:
class Foo
{
public static int stream = Bass.BASS_StreamCreateFile(path1.Text, 0, 0, BASSFlag.BASS_DEFAULT);
}
which will be later called like this:
Foo.stream
and it can also contain more then 1 stream for example stream20,30,etc...
The problem here is that it returns me this error:
"An object reference is required for the non-static field, method, or property" where I call the text in path1.Text
How do I fix this?