B
BK
Converting a rather large solution from 2003 to 2005. All the errors
are worked out, but I'm trying to clean up the warnings as best I can.
The good news is that the application and it's supporting assemblies
are all working now.
The followins snippet is from a base form class I use in the
application. Pretty typical stuff, when a data entry form is closing
and if the user is editing data, I want to allow them to save their
work. Here is part of the code:
Dim Result As New DialogResult
Result = MessageBox.Show("Save Work?", "Close Form",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1)
If Result = DialogResult.Yes Then
Me.Save()
End If
Hovering over the DialogResult.Yes portion of the snippet, I am
"greeted" with the following warning:
Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated.
I *think* I understand the warning, but I don't understand how to
resolve it. It runs just fine, but I won't feel right until I correct
the warning.
What should I change?
Will
are worked out, but I'm trying to clean up the warnings as best I can.
The good news is that the application and it's supporting assemblies
are all working now.
The followins snippet is from a base form class I use in the
application. Pretty typical stuff, when a data entry form is closing
and if the user is editing data, I want to allow them to save their
work. Here is part of the code:
Dim Result As New DialogResult
Result = MessageBox.Show("Save Work?", "Close Form",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1)
If Result = DialogResult.Yes Then
Me.Save()
End If
Hovering over the DialogResult.Yes portion of the snippet, I am
"greeted" with the following warning:
Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated.
I *think* I understand the warning, but I don't understand how to
resolve it. It runs just fine, but I won't feel right until I correct
the warning.
What should I change?
Will