QuickOPC User's Guide and Reference
SharedInstance Property (EasyDAClient)



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.DataAccess Namespace > EasyDAClient Class : SharedInstance Property
A default, shared instance of the client object.
Syntax
'Declaration
 
<DebuggerBrowsableAttribute(DebuggerBrowsableState.Never)>
<NotNullAttribute()>
Public Shared ReadOnly Property SharedInstance As EasyDAClient
'Usage
 
Dim value As EasyDAClient
 
value = EasyDAClient.SharedInstance
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[NotNull()]
public static EasyDAClient SharedInstance {get;}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[NotNull()]
public:
static property EasyDAClient^ SharedInstance {
   EasyDAClient^ get();
}
Remarks

Use this property with care, as its usability is limited. Its main use is for testing, and for non-library application code where just a single instance is sufficient.

The default instance is not suitable for Windows Forms or similar environments, where a specific System.Threading.SynchronizationContext may be used with each form.

We also do not recommend using the default instance for library code, due to conflicts that may arise if your library sets some instance parameters which may not be the same as what other libraries or the final application expects.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2012 R2, Windows Server 2016; .NET: Linux, macOS, Microsoft Windows

See Also