I try to apply SkinSoft.VisualStyler.ApplyExcludeTag(control As Control, childControls As Boolean) method to Tab Control to disable Skin for this control as below code:
Private Sub MaintenanceProgramForm_Load(sender As Object, e As EventArgs)
vssfVisualStyler.ApplyExcludeTag(FormClientsAndSites.tabClientsAndSites, False)
'Some Code
End Sub
I received this warning:
BC42025: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.
How can I disable this warning?
The warning occurs just to inform you that the
ApplyExcludeTag()method is shared and thus doesn't need an instance of its containing class in order to be called.Just call it on the class directly:
EXPLANATION
Since you seem to be unaware of how
Sharedmembers work, here's a brief explanation:Marking something as
Sharedmakes it so that you don't need a specific instance in order to access a method, field or property of that type.For example, instance methods work like this:
In order to call this you first need to initialize an instance of the
SomeClassclass:However, when marking a method as
Sharedyou no longer need to create an instance before being able to call it:Based on the warning you got, we know that
ApplyExcludeTag()is marked asShared.