A field initializer cannot reference the nonstatic field, method, or property
Posted on 2006-05-06
Can someone please help with this error. Below is the Class Member Declaration and Class Method.
A field initializer cannot reference the nonstatic field, method, or property 'App.uccPictureViewer.OpenPictureImage()'
Class Member Declaration:
private ThreadStart _openThreadStart = new ThreadStart(OpenPictureImage);
private void OpenPictureImage()
If I change class method to static I receive 15 additional errors.
The VB Code Converted from is as follows:
Private _openThread As System.Threading.Thread
Private _openThreadStart As New ThreadStart(AddressOf OpenPictureImage)
Private Sub OpenPictureImage()