VB allows you to access a shared method with an instance - in your example
"Me" is the instance. The "Cursor" property is a shared property however, so
there's no need to use an instance - just use the class. VS is simply
informing you that the "Me" will not be evaluated - useless message in this
case, but if your instance term was more complicated then it could be
informative.
Accessing shared members via an instance is sloppy. I think the warning is
there now to gradually wean people off the practice since perhaps Microsoft
will remove this capability in VB in the future? (just guessing)
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
"Learnicus" wrote:
Hi
As per subject when using the converter wizard in vs2005 to convert vb 1.1
to 2.0 code i get warnings (lots of them) about silly stuff like
Me.Cursor.Current.
It says
Access of shared member, constant member, enum member or nested type through
an instance; qualifying expression will not be evaluated.
How does me.cursor qualify for this treatment and what does it mean if i
choose to do nothing about it. The code compilies fine.
Thanks
Lenny