Error after upgrading .Net CF1.1 to .Net CF2.0

G

Guest

Hello...

I upgraded our .Net CF1.1 app to .Net CF2 and there are now 100's of errors
that refer to, "Access of shared member, constant member, enum member or
nested type through an instance; qualifying expression will not be evaluated."

Most of these are simple statements like:
objUser.Name = "My Name"

Were there changes to the .Net CF for 2.0 that would be causing these types
of errors to now appear?

thanks
- will
 
D

Daniel Moth

First, there is no netcf 1.1 only v1.0 and v2.0 Beta

So from the error you get I can tell you are using VB.

There has been a change in VB2005 (for the better) that does not allow
access to static/shared members from instance variables.

Go through your code for each error and change the instance variable (e.g.
objUser) to the type (e.g. <the class name of objUser>).

You can even turn this warning off but I strongly suggest you don't and fix
the code itself. For more on some VB compiler options (including this one)
see this:
http://www.danielmoth.com/Blog/2005/05/nowarn-or-vb-compiler-options.html

Cheers
Daniel
 
G

Guest

Thanks for the info and help.
- will

Daniel Moth said:
First, there is no netcf 1.1 only v1.0 and v2.0 Beta

So from the error you get I can tell you are using VB.

There has been a change in VB2005 (for the better) that does not allow
access to static/shared members from instance variables.

Go through your code for each error and change the instance variable (e.g.
objUser) to the type (e.g. <the class name of objUser>).

You can even turn this warning off but I strongly suggest you don't and fix
the code itself. For more on some VB compiler options (including this one)
see this:
http://www.danielmoth.com/Blog/2005/05/nowarn-or-vb-compiler-options.html

Cheers
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top