Migration problem.

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
In the 2003 code I have the following:
oReader = oFile.OpenText(myFile)
where oReader is a System.IO.StreamReader and myFile us a string refering to a temporary file location.

With the 2005 environment, I am getting the following error: "Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated". Any suggestions?

Mike55.
 
I've gotten that a few times as well while porting my code. If I remember correctly, it's a warning that you are calling a static/shared method from an object you've instantiated. Is OpenText a static method? If oFile is a System.IO.File try File.OpenText(myFile).
 
Back
Top