Today, we made a small item for outlook to move emails to the specified folder Based on the subjects of the email.
When I first started using C #, I also learned how to use it for many things. When I wrote my own outlook class, I directly used some code (class declaration) automatically generated by ), except for the following issues:
Error 1 inconsistent accessibility: property type 'movemailbasedonname. Outlook 'is less accessible than property 'movemailbasedonname. settingform. myoutlook'
The access level of the outlook class is not modified. The default access level is used. In settingform, the setting is used to access the myoutlook attribute in settingform in mainform.
Privrate outlook myoutlook = NULL;
Public outlook myoutllok
{
Get {return myoutlook ;}
}
This is the cause of compilation errors. Because the default access level of the outlook class is protect, it is lower than the public level when the get property is set. So an error occurs.
The modification method is also very simple. You only need to set the access level of the outlook class to public.