|
-
Jun 14th, 2015, 09:12 PM
#7
Re: VB.Net Release Mode: Reference to a non-shared member requires an object referenc
So, you reference things like your example, and wherever you do that you get an exception, but only in the release version. Is that right?
Your example is setting a property of a class that frmMain is derived from, since .Text is a property of Form (or Control, or some other base class). Is this true of EVERY place where you are getting the exception?
The first thing I would try would be to create my own method on frmMain, something like this:
Code:
Public Sub SetText(newText As String)
Me.Text = newText
End Sub
and call that method. It would be pretty interesting if that worked where frmMain.Text did not. It would be replacing your use of a base class property with a derived class method. I would only do this as a test, because it really shouldn't work, but if it did, it would be diagnostic.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|