Determines whether the given event source string is valid, i.e. not a null reference and not empty.
Syntax
'Declaration
<ContractAnnotationAttribute("null => false")>
<PureAttribute()>
Public Shared Function IsValidEventSource( _
ByVal As String _
) As Boolean
'Usage
Dim source As String
Dim value As Boolean
value = LogEntryEventArgs.IsValidEventSource(source)
[ContractAnnotation("null => false")]
[Pure()]
public static bool IsValidEventSource(
string
)
[ContractAnnotation("null => false")]
[Pure()]
public:
static bool IsValidEventSource(
String^
)
Parameters
- source
- The name of the event source.
Return Value
true
iff the event source string is valid.
Requirements
Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows
See Also