What does this warning mean? (Access of shared member..)

DeltaWolf7

Well-known member
Joined
Jan 21, 2006
Messages
47
Programming Experience
Beginner
Can someone explain this warning message to me please?

"Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated."

It is caused by this bit of code.

VB.NET:
[SIZE=2][COLOR=#0000ff]
If[/COLOR][/SIZE][SIZE=2] OpenFileDialog.ShowDialog() = DialogResult.OK [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE]

I am new to the language and I can't figure out why its warning me.
 
Change to Windows.Forms.DialogResult.OK. When you write .ShowDialog= in editor intellisense pop up the alternatives from the enumeration.
 
Back
Top